{"id":14130601,"url":"https://github.com/ChatLunaLab/chatluna","last_synced_at":"2025-08-04T04:32:35.096Z","repository":{"id":151887324,"uuid":"624349894","full_name":"ChatLunaLab/chatluna","owner":"ChatLunaLab","description":"多平台模型接入，可扩展，多种输出格式，提供大语言模型聊天服务的插件 | A bot plugin for LLM chat with multi-model integration, extensibility, and various output formats","archived":false,"fork":false,"pushed_at":"2025-07-28T08:03:07.000Z","size":22046,"stargazers_count":320,"open_issues_count":6,"forks_count":36,"subscribers_count":4,"default_branch":"v1-dev","last_synced_at":"2025-07-29T09:15:14.291Z","etag":null,"topics":["ai","bot","chatbot","chatglm","chatgpt","claude","deepseek","deepseek-v3","gemini","gpt","gpt-4o","koishi","langchain","llm","mcp-client","openai","plugin","qq-bot","qwen","typescript"],"latest_commit_sha":null,"homepage":"https://chatluna.chat","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChatLunaLab.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://afdian.com/a/dingyi222666"]}},"created_at":"2023-04-06T09:18:33.000Z","updated_at":"2025-07-29T06:44:29.000Z","dependencies_parsed_at":"2023-10-13T06:32:19.458Z","dependency_job_id":"a3349879-e03f-42c5-98b9-563037cd61ef","html_url":"https://github.com/ChatLunaLab/chatluna","commit_stats":{"total_commits":1531,"total_committers":9,"mean_commits":"170.11111111111111","dds":"0.053559764859568926","last_synced_commit":"e53ac65d0a93604e1287762434eee87953e08929"},"previous_names":["chathublab/chathub","dingyi222666/koishi-plugin-chathub","chatlunalab/chatluna"],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/ChatLunaLab/chatluna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLunaLab%2Fchatluna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLunaLab%2Fchatluna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLunaLab%2Fchatluna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLunaLab%2Fchatluna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChatLunaLab","download_url":"https://codeload.github.com/ChatLunaLab/chatluna/tar.gz/refs/heads/v1-dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLunaLab%2Fchatluna/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267989438,"owners_count":24177074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","chatbot","chatglm","chatgpt","claude","deepseek","deepseek-v3","gemini","gpt","gpt-4o","koishi","langchain","llm","mcp-client","openai","plugin","qq-bot","qwen","typescript"],"created_at":"2024-08-15T21:01:02.446Z","updated_at":"2025-08-04T04:32:35.085Z","avatar_url":"https://github.com/ChatLunaLab.png","language":"TypeScript","funding_links":["https://afdian.com/a/dingyi222666"],"categories":["TypeScript","📚 Projects (2474 total)"],"sub_categories":["MCP Servers"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./logo.png\" alt=\"项目图标\" title=\"项目图标\" width=\"300\" /\u003e\n\n中文 | [English](./README_EN.MD) | [日本語](./README_JP.MD)\n\n#\n\n_多平台模型接入，可扩展，多种输出格式，提供大语言模型聊天服务的机器人插件。_\n\n[![npm](https://img.shields.io/npm/v/koishi-plugin-chatluna)](https://www.npmjs.com/package/koishi-plugin-chatluna) [![npm](https://img.shields.io/npm/dm/koishi-plugin-chatluna)](https://www.npmjs.com/package/koishi-plugin-chatluna)\n\n![node version](https://img.shields.io/badge/node-%3E=18-green) ![github top language](https://img.shields.io/github/languages/top/ChatLunaLab/chatluna?logo=github)\n\n[![Telegram](https://img.shields.io/badge/Join-Telegram_Group-blue)](https://t.me/koishi_chatluna) [![QQ](https://img.shields.io/badge/Join-QQ_Group-ff69b4)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027\u0026k=eEBVq6GK7HYX2y61x55WD6hnXTIRop-0\u0026authKey=i4pG5%2BJ%2FY8auWprBubhremTkn3vroPigQq5m9RENGBLrLmlj%2BSu3G%2BqllK7Wts2M\u0026noverify=0\u0026group_code=282381753) [![doc](https://img.shields.io/badge/See-Document(WIP)-green)](https://chatluna.chat/)\n\n**项目状态：1.0 正式版（缓慢开发，准备 v2 版本）**\n\n\u003c/div\u003e\n\n## 📸 截图\n\n| 预设 | 插件模式 \u0026 流式输出 | 图像渲染输出 |\n|---------------------|--------------------------|--------------------|\n|![preset](https://s2.loli.net/2024/10/17/hfyoKXtJC5dV2Lg.webp) | ![plugin](https://s2.loli.net/2024/10/17/pcDjSIVMkB1aO6L.webp) | ![code](https://s2.loli.net/2024/10/17/7TBlbDsPM95iwdr.gif)|\n\n## ✨ 特性\n\n* 🚀 高度可扩展（基于 LangChain 和 Koishi API）\n* 🎭 自定义对话预设\n* 🛡️ 速率限制和黑名单系统\n* 🎨 多格式输出（文本、语音、图像、混合）\n* 🧠 上下文感知和 [长期记忆](./packages/long-memory/README.md)\n* 🔀 三种模式：聊天、浏览、插件\n* 🔒 内容审核（通过 [Koishi 审核服务](https://censor.koishi.chat/)）\n\n## 📝 TODO (画饼是吧)\n\n* [x] 基于房间的对话系统\n* [x] 回复内容审核 （基于其他插件提供的 censor 服务）\n* [x] 语音输出支持（即文字转语音，基于 initialencounter\n  佬的 [vits服务](https://github.com/initialencounter/2022-12-24/blob/neat/plugins/Tool/vits/readme.md)）\n* [x] 图片渲染回复\n* [x] 接入更多模型/平台\n* [x] 预设系统\n* [x] ~~导入或导出会话记录（实际未完成，已放弃支持）~~\n* [x] 重构到 v1 版本\n* [x] 流式响应支持\n* [x] 图片多模态输入支持\n* [x] [MCP 协议客户端支持](./packages/mcp-client/README.md)\n* [x] i18n 本地化支持\n\n## 🚀 部署\n\n我们可在 Koishi 下直接安装本插件使用基础功能而无需额外配置。\n\n阅读 [此文档](https://chatluna.chat/guide/getting-started.html) 了解更多。\n\n## 🔌 适配支持\n\n我们目前支持以下模型/平台：\n\n| 模型/平台                                                | 接入方式                   | 特性                                           | 注意事项                                  |\n|:-----------------------------------------------------|:-----------------------|----------------------------------------------|:--------------------------------------|\n| [OpenAI](./packages/openai-adapter/README.md)        | 本地 Client，官方 API 接入    | 可自定义人格，支持插件/浏览模式等聊天模式                        | API 接入需要付费                            |\n| [Azure OpenAI](./packages/azure-openai-adapter/README.md) | 本地 Client，官方 API 接入    | 可自定义人格，支持插件/浏览模式等聊天模式                        | API 接入需要付费                                      |\n| [Google Gemini](./packages/gemini-adapter/README.md)     | 本地 Client，官方 API 接入    | 速度快，性能超越 GPT-3.5                             | 需要有 Gemini 访问权限账号，可能收费                                      |\n| [Claude API](./packages/claude-adapter)                 | 本地 Client, 官方 API 接入    | 超大上下文，大部分情况下能超过 GPT 3.5，需要 API KEY，收费        | 可能较贵 |\n| [Deepseek](./packages/deepseek-adapter/) |   本地 Client，官方 API 接入    | 国产知名模型   | 实测效果逼近或超越 gpt-4o            |\n| [通义千问](./packages/qwen-adapter/README.md)          | 本地 Client，官方 API 接入    | 阿里出品国产模型，有开源版本，有免费额度            | 实测效果比智谱略好                                     |\n| [豆包](./packages/doubao-adapter/README.md) | 本地 Client，官方 API 接入    | 字节出品模型，送免费额度                               | 实测效果比智谱略好                          |\n| [智谱](./packages/zhipu-adapter/README.md)             | 本地 Client，官方 API 接入    | ChatGLM，新人注册可获取免费 Token 额度                   | 实测效果比讯飞星火略好                      |\n| [讯飞星火](./packages/spark-adapter/README.md)           | 本地 Client，官方 API 接入    | 国产模型，新人注册可获取免费 Token 额度                      | 实测效果约等于 GPT 3.5                 |\n| [文心一言](./packages/wenxin-adapter/README.md)          | 本地 Client，官方 API 接入    | 百度出品系列模型模型                                | 实测效果比讯飞星火略差                           |\n| [混元大模型](./packages/hunyuan-adapter/README.md)          | 本地 Client，官方 API 接入    | 腾讯出品系列大模型                              | 实测效果比文心一言好                     |\n| [Ollama](./packages/ollama-adapter/README.md)            | 本地 Client，自搭建 API 接入   | 知名开源模型合集，支持 CPU / GPU 混合部署，可本地搭建                                 | 需要自己搭建后端 API，要求一定的配置                  |\n| [RWKV](./packages/rwkv-adapter/README.md)            | 本地 Client，自搭建 API 接入   | 知名开源模型，可本地搭建                                 | 需要自己搭建后端 API，要求一定的配置                  |\n\n[为模型提供网络搜索能力](/packages/search-service/README.md) 我们支持：\n\n* Google (API)\n* Bing (API / Web)\n* DuckDuckGO (Lite)\n* Tavily (API)\n\n## 🎭 预设\n\n从 `1.0.0-alpha.10` 版本开始，我们使用更加可定制化的预设。新的人格预设使用 yaml 做为配置文件。\n\n你可以点这里来查看我们默认附带的人格文件：[catgirl.yml](/packages/core/resources/presets/catgirl.yml)\n\n我们默认的预设文件夹路径为 `你当前运行插件的 koishi 目录的路径+/data/chathub/presets` 。\n\n所有的预设文件都是从上面的文件夹上加载的。因此你可以自由添加和编辑预设文件在这个文件夹下，然后使用命令来切换人格预设。\n\n如需了解更多，可查看[此文档](https://chatluna.chat/guide/preset-system/introduction.html)。\n\n## 🔧 Fork \u0026 Develop\n\n在任意 Koishi 模版项目上运行下列指令来克隆 ChatLuna：\n\n```bash\n# yarn\nyarn clone ChatLunaLab/chatluna\n# npm\nnpm run clone ChatLunaLab/chatluna\n```\n\n可将上面 `ChatLunaLab/chatluna` 替换成你自己 Fork 后的项目地址。\n\n编辑模版项目根目录下的 `tsconfig.json` 文件，在 `compilerOptions.paths` 中添加 ChatLuna 项目路径。\n\n```json\n{\n  \"extends\": \"./tsconfig.base\",\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"koishi-plugin-chatluna-*\": [\"external/chatluna/packages/*/src\"]\n    }\n  }\n}\n```\n\n由于项目本身比较复杂，初始使用必须构建一次。\n\n```bash\n# yarn\nyarn workspace @root/chatluna-koishi build\n# npm\nnpm run build -w @root/chatluna-koishi\n```\n\n完成！现在即可在根项目中使用 `yarn dev` 或 `npm run dev` 启动模版项目并二次开发 ChatLuna。\n\n\u003e 虽然 Koishi 支持模块热替换(hmr)，但本项目可能并未完全兼容。\n\u003e\n\u003e 如果你在使用 hmr 二次开发本项目时出现了 Bug，请在 Issue 中提出，并按上面步骤重新构建项目并重启 Koishi 以尝试修复。\n\n## 🆘 Help\n\n目前 ChatLuna 项目组产能极为稀缺，没有更多产能来完成下面的目标：\n\n* [ ] Web UI\n* [ ] Http Server\n* [x] Project Documentation\n\n欢迎提交 Pull Request 或进行讨论，我们非常欢迎您的贡献！\n\n## 👥 贡献者名单\n\n\u003ca href=\"https://github.com/ChatLunaLab/chatluna/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=ChatLunaLab/chatluna\" /\u003e\n\u003c/a\u003e\n\n![Alt](https://repobeats.axiom.co/api/embed/d92b5a9398ee02a797355ed9b866aa93231c25b3.svg \"Repobeats analytics image\")\n\n[![Star History Chart](https://api.star-history.com/svg?repos=ChatLunaLab/chatluna\u0026type=Date)](https://star-history.com/#ChatLunaLab/chatluna)\n\n## 📢 使用须知\n\n本项目由[ChatLunaLab](https://github.com/ChatLunaLab) 开发。\n\nChatLuna（下称本项目）\n是一个基于大型语言模型的对话机器人框架。我们致力于与开源社区合作，推动大模型技术的发展。我们强烈呼吁开发者和其他使用者遵守开源协议，确保不将本项目（以及社区推动的基于本项目的其他衍生产品）的框架和代码以及相关衍生物用于可能对国家和社会造成危害的任何目的，以及未经过安全评估和备案的服务。\n\n本项目不直接提供任何生成式人工智能服务的支持，需要使用者自行从提供了生产式人工智能服务的组织或个人获取使用的算法 API。\n\n如果您使用了本项目，请您遵循当地地区的法律法规，使用在当地地区内可用的生产式人工智能服务算法。\n\n本项目不对算法生成的结果负责，所有结果和操作均由使用者自行负责。\n\n本项目的相关信息存储均由用户自行配置来源，项目本身不提供直接的信息存储。\n\n本项目不承担使用者导致的数据安全、舆情风险或发生任何模型被误导、滥用、传播、不当利用而产生的风险和责任。\n\n## 🙏 感谢\n\n本项目在编写时也参考了其他的开源项目，特别感谢以下项目：\n\n[koishi-plugin-openai](https://github.com/TomLBZ/koishi-plugin-openai)\n\n[node-chatgpt-api](https://github.com/waylaidwanderer/node-chatgpt-api)\n\n[poe-api](https://github.com/ading2210/poe-api)\n\n[Bard](https://github.com/muhiris/wgpt)\n\n[chathub](https://github.com/chathub-dev/chathub)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChatLunaLab%2Fchatluna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChatLunaLab%2Fchatluna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChatLunaLab%2Fchatluna/lists"}