chatluna
多平台模型接入,可扩展,多种输出格式,提供大语言模型聊天服务的插件 | A bot plugin for LLM chat services with multi-model integration, extensibility, and various output formats
Stars: 157
Chatluna is a machine learning model plugin that provides chat services with large language models. It is highly extensible, supports multiple output formats, and offers features like custom conversation presets, rate limiting, and context awareness. Users can deploy Chatluna under Koishi without additional configuration. The plugin supports various models/platforms like OpenAI, Azure OpenAI, Google Gemini, and more. It also provides preset customization using YAML files and allows for easy forking and development within Koishi projects. However, the project lacks web UI, HTTP server, and project documentation, inviting contributions from the community.
README:
预设 | 插件模式 & 流式输出 | 图像渲染输出 |
---|---|---|
- 🚀 高度可扩展(基于 LangChain 和 Koishi API)
- 🎭 自定义对话预设
- 🛡️ 速率限制和黑名单系统
- 🎨 多格式输出(文本、语音、图像、混合)
- 🧠 上下文感知和长期记忆
- 🔀 三种模式:聊天、浏览、插件
- 🔒 内容审核(通过 Koishi 审核服务)
- [x] 基于房间的对话系统
- [x] 回复内容审核 (基于其他插件提供的 censor 服务)
- [x] 语音输出支持(即文字转语音,基于 initialencounter 佬的 vits服务)
- [x] 图片渲染回复
- [x] 接入更多模型/平台
- [x] 预设系统
- [x]
导入或导出会话记录(实际未完成,已放弃支持) - [x] 重构到 v1 版本
- [x] 流式响应支持
- [x] i18n 本地化支持
我们可在 Koishi 下直接安装本插件使用基础功能而无需额外配置。
阅读 此文档 了解更多。
我们目前支持以下模型/平台:
模型/平台 | 接入方式 | 特性 | 注意事项 |
---|---|---|---|
OpenAI | 本地 Client,官方 API 接入 | 可自定义人格,支持插件/浏览模式等聊天模式 | API 接入需要付费 |
Azure OpenAI | 本地 Client,官方 API 接入 | 可自定义人格,支持插件/浏览模式等聊天模式 | API 接入需要付费 |
Google Gemini | 本地 Client,官方 API 接入 | 速度快,性能超越 GPT-3.5 | 需要有 Gemini 访问权限账号,可能收费 |
New Bing | 本地 Client,逆向 API 接入 | 自带网络搜索,强时效性,可无需登录使用 | 需要代理,需要过验证码(无需 Cookie 也可用) |
Claude API | 本地 Client,官方 API 接入 | 超大上下文,大部分情况下能超过 GPT 3.5,需要 API KEY,收费 | 可能较贵,不支持 Function Call |
通义千问 | 本地 Client,官方 API 接入 | 阿里出品国产模型,有免费额度 | 实测效果比智谱略好 |
智谱 | 本地 Client,官方 API 接入 | ChatGLM,新人注册可获取免费 Token 额度 | 实测效果比讯飞星火略好 |
讯飞星火 | 本地 Client,官方 API 接入 | 国产模型,新人注册可获取免费 Token 额度 | 实测效果约等于 GPT 3.5 |
文心一言 | 本地 Client,官方 API 接入 | 百度出品系列模型模型 | 实测效果比讯飞星火略差 |
混元大模型 | 本地 Client,官方 API 接入 | 腾讯出品系列大模型 | 实测效果比文心一言好 |
Ollama | 本地 Client,自搭建 API 接入 | 知名开源模型合集,支持 CPU / GPU 混合部署,可本地搭建 | 需要自己搭建后端 API,要求一定的配置 |
GPT Free | 本地 Client,官方 API 接入 | 本地转发使用其他网站的 GPT 模型,项目自动配置网站等配置,无需手动注册 | 可能随时失效,不稳定 |
ChatGLM | 本地 Client,自搭建后端 API 接入 | 可本地搭建,四舍五入不要钱 | 需要自己搭建后端 API,要求一定的配置,模型参数不够大导致聊天效果不够好 |
RWKV | 本地 Client,自搭建 API 接入 | 知名开源模型,可本地搭建 | 需要自己搭建后端 API,要求一定的配置 |
为模型提供网络搜索能力 我们支持:
- Google (API)
- Bing (API / Web)
- DuckDuckGO (Lite)
- Tavily (API)
从 1.0.0-alpha.10
版本开始,我们使用更加可定制化的预设。新的人格预设使用 yaml 做为配置文件。
你可以点这里来查看我们默认附带的人格文件:catgirl.yml
我们默认的预设文件夹路径为 你当前运行插件的 koishi 目录的路径+/data/chathub/presets
。
所有的预设文件都是从上面的文件夹上加载的。因此你可以自由添加和编辑预设文件在这个文件夹下,然后使用命令来切换人格预设。
如需了解更多,可查看此文档。
在任意 Koishi 模版项目上运行下列指令来克隆 ChatLuna:
# yarn
yarn clone ChatLunaLab/chatluna
# npm
npm run clone ChatLunaLab/chatluna
可将上面 ChatLunaLab/chatluna-koishi
替换成你自己 Fork 后的项目地址。
然后编辑模版项目根目录下的 tsconfig.json
文件,在 compilerOptions.paths
中添加 ChatLuna 项目路径。
{
"extends": "./tsconfig.base",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"koishi-plugin-chatluna-*": ["external/chatluna/packages/*/src"]
}
}
}
由于项目本身比较复杂,初始使用必须构建一次。
# yarn
yarn workspace @root/chatluna-koishi build
# npm
npm run build -w @root/chatluna-koishi
完成!现在即可在根项目中使用 yarn dev
或 npm run dev
启动模版项目并二次开发 ChatLuna。
虽然 Koishi 支持模块热替换(hmr),但本项目可能并未完全兼容。
如果你在使用 hmr 二次开发本项目时出现了 Bug,请在 Issue 中提出,并按上面步骤重新构建项目并重启 Koishi 以尝试修复。
目前 ChatLuna 项目组产能极为稀缺,没有更多产能来完成下面的目标:
- [ ] Web UI
- [ ] Http Server
- [ ] Project Documentation
欢迎提交 Pull Request 或进行讨论,我们非常欢迎您的贡献!
本项目由ChatLunaLab 开发。
ChatLuna(下称本项目) 是一个基于大型语言模型的对话机器人框架。我们致力于与开源社区合作,推动大模型技术的发展。我们强烈呼吁开发者和其他使用者遵守开源协议,确保不将本项目(以及社区推动的基于本项目的其他衍生产品)的框架和代码以及相关衍生物用于可能对国家和社会造成危害的任何目的,以及未经过安全评估和备案的服务。
本项目不直接提供任何生成式人工智能服务的支持,需要使用者自行从提供了生产式人工智能服务的组织或个人获取使用的算法 API。
如果您使用了本项目,请您遵循当地地区的法律法规,使用在当地地区内可用的生产式人工智能服务算法。
本项目不对算法生成的结果负责,所有结果和操作均由使用者自行负责。
本项目的相关信息存储均由用户自行配置来源,项目本身不提供直接的信息存储。
本项目不承担使用者导致的数据安全、舆情风险或发生任何模型被误导、滥用、传播、不当利用而产生的风险和责任。
本项目在编写时也参考了其他的开源项目,特别感谢以下项目:
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for chatluna
Similar Open Source Tools
chatluna
Chatluna is a machine learning model plugin that provides chat services with large language models. It is highly extensible, supports multiple output formats, and offers features like custom conversation presets, rate limiting, and context awareness. Users can deploy Chatluna under Koishi without additional configuration. The plugin supports various models/platforms like OpenAI, Azure OpenAI, Google Gemini, and more. It also provides preset customization using YAML files and allows for easy forking and development within Koishi projects. However, the project lacks web UI, HTTP server, and project documentation, inviting contributions from the community.
HivisionIDPhotos
HivisionIDPhoto is a practical algorithm for intelligent ID photo creation. It utilizes a comprehensive model workflow to recognize, cut out, and generate ID photos for various user photo scenarios. The tool offers lightweight cutting, standard ID photo generation based on different size specifications, six-inch layout photo generation, beauty enhancement (waiting), and intelligent outfit swapping (waiting). It aims to solve emergency ID photo creation issues.
agentica
Agentica is a human-centric framework for building large language model agents. It provides functionalities for planning, memory management, tool usage, and supports features like reflection, planning and execution, RAG, multi-agent, multi-role, and workflow. The tool allows users to quickly code and orchestrate agents, customize prompts, and make API calls to various services. It supports API calls to OpenAI, Azure, Deepseek, Moonshot, Claude, Ollama, and Together. Agentica aims to simplify the process of building AI agents by providing a user-friendly interface and a range of functionalities for agent development.
TigerBot
TigerBot is a cutting-edge foundation for your very own LLM, providing a world-class large model for innovative Chinese-style contributions. It offers various upgrades and features, such as search mode enhancements, support for large context lengths, and the ability to play text-based games. TigerBot is suitable for prompt-based game engine development, interactive game design, and real-time feedback for playable games.
AI0x0.com
AI 0x0 is a versatile AI query generation desktop floating assistant application that supports MacOS and Windows. It allows users to utilize AI capabilities in any desktop software to query and generate text, images, audio, and video data, helping them work more efficiently. The application features a dynamic desktop floating ball, floating dialogue bubbles, customizable presets, conversation bookmarking, preset packages, network acceleration, query mode, input mode, mouse navigation, deep customization of ChatGPT Next Web, support for full-format libraries, online search, voice broadcasting, voice recognition, voice assistant, application plugins, multi-model support, online text and image generation, image recognition, frosted glass interface, light and dark theme adaptation for each language model, and free access to all language models except Chat0x0 with a key.
Semi-Auto-NovelAI-to-Pixiv
Semi-Auto-NovelAI-to-Pixiv is a powerful tool that enables batch image generation with NovelAI, along with various other useful features in a super user-friendly interface. It allows users to create images, generate random images, upload images to Pixiv, apply filters, enhance images, add watermarks, and more. The tool also supports video-to-image conversion and various image manipulation tasks. It offers a seamless experience for users looking to automate image processing tasks.
video-subtitle-remover
Video-subtitle-remover (VSR) is a software based on AI technology that removes hard subtitles from videos. It achieves the following functions: - Lossless resolution: Remove hard subtitles from videos, generate files with subtitles removed - Fill the region of removed subtitles using a powerful AI algorithm model (non-adjacent pixel filling and mosaic removal) - Support custom subtitle positions, only remove subtitles in defined positions (input position) - Support automatic removal of all text in the entire video (no input position required) - Support batch removal of watermark text from multiple images.
petercat
Peter Cat is an intelligent Q&A chatbot solution designed for community maintainers and developers. It provides a conversational Q&A agent configuration system, self-hosting deployment solutions, and a convenient integrated application SDK. Users can easily create intelligent Q&A chatbots for their GitHub repositories and quickly integrate them into various official websites or projects to provide more efficient technical support for the community.
ipex-llm
IPEX-LLM is a PyTorch library for running Large Language Models (LLMs) on Intel CPUs and GPUs with very low latency. It provides seamless integration with various LLM frameworks and tools, including llama.cpp, ollama, Text-Generation-WebUI, HuggingFace transformers, and more. IPEX-LLM has been optimized and verified on over 50 LLM models, including LLaMA, Mistral, Mixtral, Gemma, LLaVA, Whisper, ChatGLM, Baichuan, Qwen, and RWKV. It supports a range of low-bit inference formats, including INT4, FP8, FP4, INT8, INT2, FP16, and BF16, as well as finetuning capabilities for LoRA, QLoRA, DPO, QA-LoRA, and ReLoRA. IPEX-LLM is actively maintained and updated with new features and optimizations, making it a valuable tool for researchers, developers, and anyone interested in exploring and utilizing LLMs.
litellm
LiteLLM is a tool that allows you to call all LLM APIs using the OpenAI format. This includes Bedrock, Huggingface, VertexAI, TogetherAI, Azure, OpenAI, and more. LiteLLM manages translating inputs to provider's `completion`, `embedding`, and `image_generation` endpoints, providing consistent output, and retry/fallback logic across multiple deployments. It also supports setting budgets and rate limits per project, api key, and model.
fastapi
智元 Fast API is a one-stop API management system that unifies various LLM APIs in terms of format, standards, and management, achieving the ultimate in functionality, performance, and user experience. It supports various models from companies like OpenAI, Azure, Baidu, Keda Xunfei, Alibaba Cloud, Zhifu AI, Google, DeepSeek, 360 Brain, and Midjourney. The project provides user and admin portals for preview, supports cluster deployment, multi-site deployment, and cross-zone deployment. It also offers Docker deployment, a public API site for registration, and screenshots of the admin and user portals. The API interface is similar to OpenAI's interface, and the project is open source with repositories for API, web, admin, and SDK on GitHub and Gitee.
bytedesk
Bytedesk is an AI-powered customer service and team instant messaging tool that offers features like enterprise instant messaging, online customer service, large model AI assistant, and local area network file transfer. It supports multi-level organizational structure, role management, permission management, chat record management, seating workbench, work order system, seat management, data dashboard, manual knowledge base, skill group management, real-time monitoring, announcements, sensitive words, CRM, report function, and integrated customer service workbench services. The tool is designed for team use with easy configuration throughout the company, and it allows file transfer across platforms using WiFi/hotspots without the need for internet connection.
Langchain-Chatchat
LangChain-Chatchat is an open-source, offline-deployable retrieval-enhanced generation (RAG) large model knowledge base project based on large language models such as ChatGLM and application frameworks such as Langchain. It aims to establish a knowledge base Q&A solution that is friendly to Chinese scenarios, supports open-source models, and can run offline.
wenda
Wenda is a platform for large-scale language model invocation designed to efficiently generate content for specific environments, considering the limitations of personal and small business computing resources, as well as knowledge security and privacy issues. The platform integrates capabilities such as knowledge base integration, multiple large language models for offline deployment, auto scripts for additional functionality, and other practical capabilities like conversation history management and multi-user simultaneous usage.
airbyte-connectors
This repository contains Airbyte connectors used in Faros and Faros Community Edition platforms as well as Airbyte Connector Development Kit (CDK) for JavaScript/TypeScript.
widgets
Widgets is a desktop component front-end open source component. The project is still being continuously improved. The desktop component client can be downloaded and run in two ways: 1. https://www.microsoft.com/store/productId/9NPR50GQ7T53 2. https://widgetjs.cn After cloning the code, you need to download the dependency in the project directory: `shell pnpm install` and run: `shell pnpm serve`
For similar tasks
chatluna
Chatluna is a machine learning model plugin that provides chat services with large language models. It is highly extensible, supports multiple output formats, and offers features like custom conversation presets, rate limiting, and context awareness. Users can deploy Chatluna under Koishi without additional configuration. The plugin supports various models/platforms like OpenAI, Azure OpenAI, Google Gemini, and more. It also provides preset customization using YAML files and allows for easy forking and development within Koishi projects. However, the project lacks web UI, HTTP server, and project documentation, inviting contributions from the community.
For similar jobs
weave
Weave is a toolkit for developing Generative AI applications, built by Weights & Biases. With Weave, you can log and debug language model inputs, outputs, and traces; build rigorous, apples-to-apples evaluations for language model use cases; and organize all the information generated across the LLM workflow, from experimentation to evaluations to production. Weave aims to bring rigor, best-practices, and composability to the inherently experimental process of developing Generative AI software, without introducing cognitive overhead.
LLMStack
LLMStack is a no-code platform for building generative AI agents, workflows, and chatbots. It allows users to connect their own data, internal tools, and GPT-powered models without any coding experience. LLMStack can be deployed to the cloud or on-premise and can be accessed via HTTP API or triggered from Slack or Discord.
VisionCraft
The VisionCraft API is a free API for using over 100 different AI models. From images to sound.
kaito
Kaito is an operator that automates the AI/ML inference model deployment in a Kubernetes cluster. It manages large model files using container images, avoids tuning deployment parameters to fit GPU hardware by providing preset configurations, auto-provisions GPU nodes based on model requirements, and hosts large model images in the public Microsoft Container Registry (MCR) if the license allows. Using Kaito, the workflow of onboarding large AI inference models in Kubernetes is largely simplified.
PyRIT
PyRIT is an open access automation framework designed to empower security professionals and ML engineers to red team foundation models and their applications. It automates AI Red Teaming tasks to allow operators to focus on more complicated and time-consuming tasks and can also identify security harms such as misuse (e.g., malware generation, jailbreaking), and privacy harms (e.g., identity theft). The goal is to allow researchers to have a baseline of how well their model and entire inference pipeline is doing against different harm categories and to be able to compare that baseline to future iterations of their model. This allows them to have empirical data on how well their model is doing today, and detect any degradation of performance based on future improvements.
tabby
Tabby is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features: * Self-contained, with no need for a DBMS or cloud service. * OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE). * Supports consumer-grade GPUs.
spear
SPEAR (Simulator for Photorealistic Embodied AI Research) is a powerful tool for training embodied agents. It features 300 unique virtual indoor environments with 2,566 unique rooms and 17,234 unique objects that can be manipulated individually. Each environment is designed by a professional artist and features detailed geometry, photorealistic materials, and a unique floor plan and object layout. SPEAR is implemented as Unreal Engine assets and provides an OpenAI Gym interface for interacting with the environments via Python.
Magick
Magick is a groundbreaking visual AIDE (Artificial Intelligence Development Environment) for no-code data pipelines and multimodal agents. Magick can connect to other services and comes with nodes and templates well-suited for intelligent agents, chatbots, complex reasoning systems and realistic characters.