
chatluna
多平台模型接入,可扩展,多种输出格式,提供大语言模型聊天服务的插件 | A bot plugin for LLM chat with multi-model integration, extensibility, and various output formats
Stars: 287

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 访问权限账号,可能收费 |
Claude API | 本地 Client, 官方 API 接入 | 超大上下文,大部分情况下能超过 GPT 3.5,需要 API KEY,收费 | 可能较贵 |
Deepseek | 本地 Client,官方 API 接入 | 国产知名模型 | 实测效果逼近或超越 gpt-4o |
通义千问 | 本地 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
替换成你自己 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
- [x] 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.

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.

web-builder
Web Builder is a low-code front-end framework based on Material for Angular, offering a rich component library for excellent digital innovation experience. It allows rapid construction of modern responsive UI, multi-theme, multi-language web pages through drag-and-drop visual configuration. The framework includes a beautiful admin theme, complete front-end solutions, and AI integration in the Pro version for optimizing copy, creating components, and generating pages with a single sentence.

JiwuChat
JiwuChat is a lightweight multi-platform chat application built on Tauri2 and Nuxt3, with various real-time messaging features, AI group chat bots (such as 'iFlytek Spark', 'KimiAI' etc.), WebRTC audio-video calling, screen sharing, and AI shopping functions. It supports seamless cross-device communication, covering text, images, files, and voice messages, also supporting group chats and customizable settings. It provides light/dark mode for efficient social networking.

jiwu-mall-chat-tauri
Jiwu Chat Tauri APP is a desktop chat application based on Nuxt3 + Tauri + Element Plus framework. It provides a beautiful user interface with integrated chat and social functions. It also supports AI shopping chat and global dark mode. Users can engage in real-time chat, share updates, and interact with AI customer service through this application.

dora
Dataflow-oriented robotic application (dora-rs) is a framework that makes creation of robotic applications fast and simple. Building a robotic application can be summed up as bringing together hardwares, algorithms, and AI models, and make them communicate with each others. At dora-rs, we try to: make integration of hardware and software easy by supporting Python, C, C++, and also ROS2. make communication low latency by using zero-copy Arrow messages. dora-rs is still experimental and you might experience bugs, but we're working very hard to make it stable as possible.

MEGREZ
MEGREZ is a modern and elegant open-source high-performance computing platform that efficiently manages GPU resources. It allows for easy container instance creation, supports multiple nodes/multiple GPUs, modern UI environment isolation, customizable performance configurations, and user data isolation. The platform also comes with pre-installed deep learning environments, supports multiple users, features a VSCode web version, resource performance monitoring dashboard, and Jupyter Notebook support.

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.

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.

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.

build_MiniLLM_from_scratch
This repository aims to build a low-parameter LLM model through pretraining, fine-tuning, model rewarding, and reinforcement learning stages to create a chat model capable of simple conversation tasks. It features using the bert4torch training framework, seamless integration with transformers package for inference, optimized file reading during training to reduce memory usage, providing complete training logs for reproducibility, and the ability to customize robot attributes. The chat model supports multi-turn conversations. The trained model currently only supports basic chat functionality due to limitations in corpus size, model scale, SFT corpus size, and quality.

gpupixel
GPUPixel is a real-time, high-performance image and video filter library written in C++11 and based on OpenGL/ES. It incorporates a built-in beauty face filter that achieves commercial-grade beauty effects. The library is extremely easy to compile and integrate with a small size, supporting platforms including iOS, Android, Mac, Windows, and Linux. GPUPixel provides various filters like skin smoothing, whitening, face slimming, big eyes, lipstick, and blush. It supports input formats like YUV420P, RGBA, JPEG, PNG, and output formats like RGBA and YUV420P. The library's performance on devices like iPhone and Android is optimized, with low CPU usage and fast processing times. GPUPixel's lib size is compact, making it suitable for mobile and desktop applications.

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.
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.