anka ccb380ce06 feat: 支持接入 Coze (#2858)
* feat: 适配 coze 供应商
1. 支持文件上传
2. 支持多模态
3. 支持流式传输
4. 支持 API 端的上下文保存历史记录
5. 支持类似 dify 的 forget 接口

* style: format code

* fix: type checking error

* fix: 修复:
1. 使用coze api端的上下文时, 现在不会重复传递上下文
2. 使用 AstrBot 的上下文时, 正确处理其中的图片信息
3. 上传图片时, 提供一个非持久化的缓存避免重复上传(在解析上下文并将文件转化为file_id传递给coze api时, 如果没有缓存会导致很多的网络资源浪费)
4. 修复reset等指令不能正确重置上下文的问题

* fix: 移除某些地方多余的针对 dify 的断言, 以兼容 Coze

* style: 修改配置项显示/webchat平台对于非预期的类型的处理

* fix: 让conversation_id放到请求中正确的位置

* refactor: extract coze api client

* refactor: improve image processing logic in ProviderCoze

* chore: remove file ext guessing

---------

Co-authored-by: Soulter <905617992@qq.com>
2025-09-27 14:23:29 +08:00
2025-09-27 14:23:29 +08:00
2025-09-23 22:16:36 +08:00
2025-09-27 14:23:29 +08:00
2025-09-27 14:23:29 +08:00
2025-03-03 13:30:55 +08:00
2025-05-10 10:02:18 +08:00
2025-03-24 17:08:12 +00:00
2025-05-01 20:32:05 +08:00
2023-04-15 15:33:00 +08:00
2025-03-25 13:24:37 +08:00
2025-02-24 00:31:57 +08:00
2025-09-23 22:16:36 +08:00

6e1279651f16d7fdf4727558b72bbaf1

Easy-to-use Multi-platform LLM Chatbot & Development Framework

Soulter%2FAstrBot | Trendshift

GitHub release (latest by date) python Docker pull Static Badge wakatime Dynamic JSON Badge codecov

Documentation Issue Tracking

AstrBot is a loosely coupled, asynchronous chatbot and development framework that supports multi-platform deployment, featuring an easy-to-use plugin system and comprehensive Large Language Model (LLM) integration capabilities.

Key Features

  1. LLM Conversations - Supports various LLMs including OpenAI API, Google Gemini, Llama, Deepseek, ChatGLM, etc. Enables local model deployment via Ollama/LLMTuner. Features multi-turn dialogues, personality contexts, multimodal capabilities (image understanding), and speech-to-text (Whisper).
  2. Multi-platform Integration - Supports QQ (OneBot), QQ Channels, WeChat (Gewechat), Feishu, and Telegram. Planned support for DingTalk, Discord, WhatsApp, and Xiaomi Smart Speakers. Includes rate limiting, whitelisting, keyword filtering, and Baidu content moderation.
  3. Agent Capabilities - Native support for code execution, natural language TODO lists, web search. Integrates with Dify Platform for easy access to Dify assistants/knowledge bases/workflows.
  4. Plugin System - Optimized plugin mechanism with minimal development effort. Supports multiple installed plugins.
  5. Web Dashboard - Visual configuration management, plugin controls, logging, and WebChat interface for direct LLM interaction.
  6. High Stability & Modularity - Event bus and pipeline architecture ensures high modularization and loose coupling.

Tip

Dashboard Demo: https://demo.astrbot.app/
Username: astrbot, Password: astrbot (LLM not configured for chat page)

Deployment

Docker Deployment

See docs: Deploy with Docker

Windows Installer

Requires Python (>3.10). See docs: Windows Installer Guide

Replit Deployment

Run on Repl.it

CasaOS Deployment

Community-contributed method.
See docs: CasaOS Deployment

Manual Deployment

See docs: Source Code Deployment

Platform Support

Platform Status Details Message Types
QQ (Official Bot) Private/Group chats Text, Images
QQ (OneBot) Private/Group chats Text, Images, Voice
WeChat (Personal) Private/Group chats Text, Images, Voice
Telegram Private/Group chats Text, Images
WeChat Work Private chats Text, Images, Voice
Feishu Group chats Text, Images
WeChat Open Platform 🚧 Planned -
Discord 🚧 Planned -
WhatsApp 🚧 Planned -
Xiaomi Speakers 🚧 Planned -

Provider Support Status

Name Support Type Notes
OpenAI API Text Generation Supports all OpenAI API-compatible services including DeepSeek, Google Gemini, GLM, Moonshot, Alibaba Cloud Bailian, Silicon Flow, xAI, etc.
Claude API Text Generation
Google Gemini API Text Generation
Dify LLMOps
DashScope (Alibaba Cloud) LLMOps
Ollama Model Loader Local deployment for open-source LLMs (DeepSeek, Llama, etc.)
LM Studio Model Loader Local deployment for open-source LLMs (DeepSeek, Llama, etc.)
LLMTuner Model Loader Local loading of fine-tuned models (e.g. LoRA)
OneAPI LLM Distribution
Whisper Speech-to-Text Supports API and local deployment
SenseVoice Speech-to-Text Local deployment
OpenAI TTS API Text-to-Speech
Fishaudio Text-to-Speech Project involving GPT-Sovits author

🦌 Roadmap

Tip

Suggestions welcome via Issues <3

  • Ensure feature parity across all platform adapters
  • Optimize plugin APIs
  • Add default TTS services (e.g., GPT-Sovits)
  • Enhance chat features with persistent memory
  • i18n Planning

❤️ Contributions

All Issues/PRs welcome! Simply submit your changes to this project :)

For major features, please discuss via Issues first.

🌟 Support

Demos

Note

Code executor file I/O currently tested with Napcat(QQ)/Lagrange(QQ)

Docker-based Sandboxed Code Executor (Beta)

Multimodal Input, Web Search, Text-to-Image

Natural Language TODO Lists

Plugin System Showcase

Web Dashboard

webchat

Built-in Web Chat Interface

Star History

Tip

If this project helps you, please give it a star <3

Star History Chart

Disclaimer

  1. Licensed under AGPL-v3.
  2. WeChat integration uses Gewechat. Use at your own risk with non-critical accounts.
  3. Users must comply with local laws and regulations.

私は、高性能ですから!

S
Description
No description provided
Readme AGPL-3.0 65 MiB
Languages
Python 69.1%
Vue 25.4%
TypeScript 3.4%
JavaScript 1.4%
Shell 0.3%
Other 0.4%