kirara-ai README

The project's README from github.com/lss233/kirara-ai. As one markdown file: README.md.

Kirara AI

一款支持主流大语言模型、主流聊天平台的聊天的机器人!

» 查看项目手册 »

Github stars PyPI License

Docker build latest Docker Pulls Codecov Mypy checked


cover


🌟 社区交流

加入我们的社区,获取最新项目动态、视频教程、问题答疑和技术交流!

提问前请先查看: 加入群组前,请先查看项目问题列表,看是否能解决你的问题。

如需提问,请准备好问题描述、完整日志和相关配置文件,以便我们更好地帮助你。
进群请备注:GitHub

📷 功能展示

猫娘问答 智能助手 沉浸式RPG
猫娘模式 日常助手 文字冒险

🧭 WebUI

模型管理

image

工作流

image

插件市场

image

⚡ 核心特性

🤖 聊天平台

我们支持多种聊天平台。

平台 群聊回复 私聊回复 条件触发 管理员指令 绘图 语音回复
Telegram 支持 支持 支持 支持 支持 支持
QQ 机器人 支持 支持 支持 支持 支持 平台不支持
Discord 重构中 重构中 重构中 重构中 重构中 重构中
飞书机器人 重构中 重构中 重构中 重构中 重构中 重构中
企业微信应用 支持 支持 支持 不支持 支持 支持
微信公众号 支持 支持 支持 不支持 支持 支持
OneBot 插件支持 插件支持 插件支持 插件支持 插件支持 插件支持

🐎 命令

你可以在 WebUI 的调度规则中自定义所有命令。

🔧 搭建

请移步至 快速开始

🕸 HTTP API

HTTP API 可用于接入其他平台。 在聊天平台管理中启动 http-legacy 适配器后,将提供以下接口:

POST /v1/chat

请求参数

参数名 必选 类型 说明
session_id 是 String 会话ID,默认:friend-default_session
username 是 String 用户名,默认:某人
message 是 String 消息,不能为空

请求示例

{
    "session_id": "friend-123456",
    "username": "testuser",
    "message": "ping"
}

响应格式

参数名 类型 说明
result String SUCESS,DONE,FAILED
message String[] 文本返回,支持多段返回
voice String[] 音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,...
image String[] 图片返回,支持多个图片的base64编码;参考:data:image/png;base64,...

响应示例

{
    "result": "DONE",
    "message": ["pong!"],
    "voice": [],
    "image": []
}

POST /v2/chat

请求参数

参数名 必选 类型 说明
session_id 是 String 会话ID,默认:friend-default_session
username 是 String 用户名,默认:某人
message 是 String 消息,不能为空

请求示例

{
    "session_id": "friend-123456",
    "username": "testuser",
    "message": "ping"
}

响应格式 字符串:request_id

响应示例

1681525479905

GET /v2/chat/response

请求参数

参数名 必选 类型 说明
request_id 是 String 请求id,/v2/chat返回的值

请求示例

/v2/chat/response?request_id=1681525479905

响应格式

参数名 类型 说明
result String SUCESS,DONE,FAILED
message String[] 文本返回,支持多段返回
voice String[] 音频返回,支持多个音频的base64编码;参考:data:audio/mpeg;base64,...
image String[] 图片返回,支持多个图片的base64编码;参考:data:image/png;base64,...
  • 每次请求返回增量并清空。DONE、FAILED之后没有更多返回。

响应示例

{
    "result": "DONE",
    "message": ["pong!"],
    "voice": ["data:audio/mpeg;base64,..."],
    "image": ["data:image/png;base64,...", "data:image/png;base64,..."]
}

🦊 加载预设

如果你想让机器人自动带上某种聊天风格,可以使用预设功能。

我们自带了 猫娘 和 正常 两种预设,你可以在 presets 文件夹下了解预设的写法。

使用 加载预设 猫娘 来加载猫娘预设。

下面是一些预设的小视频,你可以看看效果:

关于预设系统的详细教程:Wiki

你可以在 Awesome ChatGPT QQ Presets 获取由大家分享的预设。

你也可以参考 Awesome-ChatGPT-prompts-ZH_CN 来调教你的 ChatGPT,还可以参考 Awesome ChatGPT Prompts 来解锁更多技能。

🎙 文字转语音

自 v2.2.5 开始,我们支持接入微软的 Azure 引擎 和 VITS 引擎,让你的机器人发送语音。

提示:在 Windows 平台上使用语音功能需要安装最新的 VC 运行库,你可以在这里下载。`

🛠 贡献者名单

欢迎提出新的点子、 Pull Request。

Made with contrib.rocks.

📕 相关项目

💪 支持我们

如果我们这个项目对你有所帮助,请给我们一颗 ⭐️

Star History Chart

kirara-ai (lss233/kirara-ai)

Searching Database…

19.1K ·GitHub
What is this?Kirara AI is a DIY, open-source multimodal AI chatbot you self-host: a Python server that plugs mainstream LLMs into chat platforms like QQ, Telegram, Discord and WeChat.
Is this a hosted service or something I run myself?You run it yourself: it is a self-hosted Python bot server with a WebUI, a plugin system and custom workflows, and it can also act as an HTTP server exposing a Web API for other integrations.
How do I get it up and running?The README points you to the Quick Start guide. The repo publishes Docker images via CI and includes a Windows quickstart workflow, so a Docker deployment or the Windows route are the two paths.
Which AI models can power the chat?The big hosted models: OpenAI, DeepSeek, Claude, Gemini, Grok, Qwen, Mistral, Doubao, Minimax and Kimi, plus locally hosted models through Ollama.
Which integrations are not finished yet?Discord and Feishu support is being rewritten right now, so those two are effectively unusable. On Windows, voice replies additionally require installing the latest VC++ runtime.
Which chat platforms can I hook it up to?Telegram is fully supported including voice replies; QQ bots do everything except voice (the platform doesn't support it); WeCom apps and WeChat official accounts work but without admin commands; OneBot works through plugins.
Why does the bot ship with a built-in Frpc client?Frpc provides NAT traversal out of the box, so a Kirara instance running on a home machine behind NAT can still receive callbacks from platforms that need a public endpoint — no separate tunnel to install.
What can I manage from the WebUI?It is the web admin panel: model management, workflow building and the plugin marketplace live there, and all bot commands are customized in its scheduling rules.
Is there an ecosystem around the project?Yes — Kirara Registry is the plugin marketplace, Kirara WebUI is a separate frontend project, Kirara Docs hosts the manual, and QQ groups handle community support.
What are similar projects?AstrBot, LangBot, unsloth, brigade, NextChat, LibreChat, aichat, Raven
Creator
lss233
Size
37.9 MB
Stars
19.1K
Age
3y
Commits · 90 Days