* feat: 为 Misskey 适配器修正一些问题,添加投票信息读取支持 * feat: 增强 Misskey 平台适配器,添加随机重连延迟和通道重新订阅功能 * feat: 添加文件上传功能并优化消息发送接口,支持同时发送文件和文本 * feat: 增强文件上传功能,支持 MIME 类型检测和外部 URL 回退 * feat: 增加 Misskey 文件上传功能开关,支持配置文件上传启用与并发限制 * feat: 添加 Misskey 文件上传目标文件夹配置,支持将文件上传到指定文件夹 * feat: 优化 Misskey 平台适配器,增强文件上传和消息发送功能,支持更多可选字段 * feat: 代码优化结构与功能 * feat(misskey): 增强消息发送逻辑和工具函数 - 重构了 `misskey_event.py` 中的 `send` 方法,使用新的适配器方法 `send_by_session`,以改进消息处理(包括文件上传)。 - 添加了详细的日志记录,以提高消息发送过程的可追溯性。 - 在 `misskey_utils.py` 中引入了 `FileIDExtractor` 和 `MessagePayloadBuilder` 类,以简化文件 ID 提取和消息载荷构建。 - 在 `misskey_utils.py` 中实现了 MIME 类型检测和文件扩展名解析,以支持多种文件上传。 - 增强了 `resolve_component_url_or_path`,以更好地处理不同类型的组件上传文件。 - 在 `upload_local_with_retries` 中添加了重试逻辑,以优雅地处理不允许的文件类型。 * feat(misskey): 限制文件上传并发数,优化消息处理逻辑 * feat(misskey): ruff formatted * feat: 大幅优化 misskey 文件上传逻辑,简化上传流程并增强可见性解析 * feat(misskey): 移除 Url上传方式,精简日志 * fix(misskey): 修复错把URL文件当本地文件上传的问题,明确处理 URL 和本地文件的方式 * fix(misskey): 修复 session_id 解析逻辑,确保与 user_cache 键格式匹配 * perf: streaming the file with a file object in FormData to reduce peak memory usage. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * style: format debug log message for local file upload in MisskeyAPI * refactor: remove unnecessary thread executor for reading file bytes in MisskeyAPI --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com>
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
- 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).
- 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.
- 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.
- Plugin System - Optimized plugin mechanism with minimal development effort. Supports multiple installed plugins.
- Web Dashboard - Visual configuration management, plugin controls, logging, and WebChat interface for direct LLM interaction.
- 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
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 | - |
| 🚧 | 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 ✨
✨ Built-in Web Chat Interface ✨
⭐ Star History
Tip
If this project helps you, please give it a star <3
Disclaimer
- Licensed under
AGPL-v3. - WeChat integration uses Gewechat. Use at your own risk with non-critical accounts.
- Users must comply with local laws and regulations.
私は、高性能ですから!
