diff --git a/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml b/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml index 7957178cf..56f958d30 100644 --- a/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml +++ b/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml @@ -16,7 +16,7 @@ body: 请将插件信息填写到下方的 JSON 代码块中。其中 `tags`(插件标签)和 `social_link`(社交链接)选填。 - 不熟悉 JSON ?现在可以从 [这里](https://plugins.astrbot.app/#/submit) 获取你的 JSON 啦!获取到了记得复制粘贴过来哦! + 不熟悉 JSON ?可以从 [此处](https://plugins.astrbot.app/submit) 生成 JSON ,生成后记得复制粘贴过来. - type: textarea id: plugin-info @@ -26,12 +26,13 @@ body: value: | ```json { - "name": "插件名", - "desc": "插件介绍", + "name": "插件名,请以 astrbot_plugin_ 开头", + "display_name": "用于展示的插件名,方便人类阅读", + "desc": "插件的简短介绍", "author": "作者名", "repo": "插件仓库链接", "tags": [], - "social_link": "" + "social_link": "", } ``` validations: diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index 39c0952f3..d395bdc15 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -11,6 +11,8 @@ reviewers: - Larch-C - anka-afk - advent259141 + - Fridemn + - LIghtJUNction # - zouyonghe # A number of reviewers added to the pull request diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9d79d4345..85cde14f5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -60,7 +60,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -88,6 +88,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dashboard_ci.yml b/.github/workflows/dashboard_ci.yml index 9299dd6f5..f02085f84 100644 --- a/.github/workflows/dashboard_ci.yml +++ b/.github/workflows/dashboard_ci.yml @@ -13,11 +13,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 'latest' + - name: npm install, build run: | cd dashboard - npm install - npm run build + npm install pnpm -g + pnpm install + pnpm i --save-dev @types/markdown-it + pnpm run build - name: Inject Commit SHA id: get_sha @@ -29,7 +36,7 @@ jobs: zip -r dist.zip dist - name: Archive production artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: dist-without-markdown path: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0a0e3146..8611e2698 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,20 @@ ci: autoupdate_schedule: weekly autoupdate_commit_msg: ":balloon: pre-commit autoupdate" repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 - hooks: - - id: ruff - - id: ruff-format +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.14.1 + hooks: + # Run the linter. + - id: ruff-check + types_or: [ python, pyi ] + args: [ --fix ] + # Run the formatter. + - id: ruff-format + types_or: [ python, pyi ] + +- repo: https://github.com/asottile/pyupgrade + rev: v3.21.0 + hooks: + - id: pyupgrade + args: [--py310-plus] diff --git a/README.md b/README.md index af6bd3e59..5615464da 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,38 @@ -image

- ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)

+
+ +
Soulter%2FAstrBot | Trendshift - -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Soulter/AstrBot?style=for-the-badge&color=76bad9)](https://github.com/Soulter/AstrBot/releases/latest) -python -Docker pull -QQ_community -Telegram_community -[![wakatime](https://wakatime.com/badge/user/915e5316-99c6-4563-a483-ef186cf000c9/project/018e705a-a1a7-409a-a849-3013485e6c8e.svg?style=for-the-badge&color=76bad9)](https://wakatime.com/badge/user/915e5316-99c6-4563-a483-ef186cf000c9/project/018e705a-a1a7-409a-a849-3013485e6c8e) -![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%E4%B8%AA&style=for-the-badge&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA&cacheSeconds=3600) - -English | -日本語 | -文档 | -Blog | -问题提交 +Featured|HelloGitHub
-AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架。 +
+ +
+ +python +Docker pull +QQ_community +Telegram_community + +
+ +
+ +English | +日本語 | +文档 | +Blog | +路线图 | +问题提交 +
+ +AstrBot 是一个开源的一站式 Agent 聊天机器人平台及开发框架。 ## 主要功能 @@ -35,7 +44,7 @@ AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架 ## 部署方式 -#### Docker 部署 +#### Docker 部署(推荐 🥳) 推荐使用 Docker / Docker Compose 方式部署 AstrBot。 @@ -63,7 +72,7 @@ AstrBot 已由雨云官方上架至云应用平台,可一键部署。 社区贡献的部署方式。 -[![Run on Repl.it](https://repl.it/badge/github/Soulter/AstrBot)](https://repl.it/github/Soulter/AstrBot) +[![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot) #### Windows 一键安装器部署 @@ -101,7 +110,6 @@ uv run main.py - 5 群:822130018 - 6 群:753075035 - 开发者群:975206796 -- 开发者群(备份):295657329 ### Telegram 群组 @@ -113,48 +121,81 @@ uv run main.py ## ⚡ 消息平台支持情况 +**官方维护** + | 平台 | 支持性 | | -------- | ------- | -| QQ(官方机器人接口) | ✔ | +| QQ(官方平台) | ✔ | | QQ(OneBot) | ✔ | | Telegram | ✔ | -| 企业微信 | ✔ | +| 企微应用 | ✔ | +| 企微智能机器人 | ✔ | | 微信客服 | ✔ | | 微信公众号 | ✔ | | 飞书 | ✔ | | 钉钉 | ✔ | | Slack | ✔ | | Discord | ✔ | -| [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | ✔ | -| [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | ✔ | | Satori | ✔ | | Misskey | ✔ | +| Whatsapp | 将支持 | +| LINE | 将支持 | + +**社区维护** + +| 平台 | 支持性 | +| -------- | ------- | +| [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | ✔ | +| [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | ✔ | +| [Bilibili 私信](https://github.com/Hina-Chat/astrbot_plugin_bilibili_adapter) | ✔ | +| [wxauto](https://github.com/luosheng520qaq/wxauto-repost-onebotv11) | ✔ | ## ⚡ 提供商支持情况 -| 名称 | 支持性 | 类型 | 备注 | -| -------- | ------- | ------- | ------- | -| OpenAI | ✔ | 文本生成 | 支持任何兼容 OpenAI API 的服务 | -| Anthropic | ✔ | 文本生成 | | -| Google Gemini | ✔ | 文本生成 | | -| Dify | ✔ | LLMOps | | -| 阿里云百炼应用 | ✔ | LLMOps | | -| Ollama | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 | -| LM Studio | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 | -| [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | ✔ | 模型 API 及算力服务平台 | | -| [302.AI](https://share.302.ai/rr1M3l) | ✔ | 模型 API 服务平台 | | -| 硅基流动 | ✔ | 模型 API 服务平台 | | -| PPIO 派欧云 | ✔ | 模型 API 服务平台 | | -| OneAPI | ✔ | LLM 分发系统 | | -| Whisper | ✔ | 语音转文本 | 支持 API、本地部署 | -| SenseVoice | ✔ | 语音转文本 | 本地部署 | -| OpenAI TTS API | ✔ | 文本转语音 | | -| GSVI | ✔ | 文本转语音 | GPT-Sovits-Inference | -| GPT-SoVITs | ✔ | 文本转语音 | GPT-Sovits-Inference | -| FishAudio | ✔ | 文本转语音 | GPT-Sovits 作者参与的项目 | -| Edge TTS | ✔ | 文本转语音 | Edge 浏览器的免费 TTS | -| 阿里云百炼 TTS | ✔ | 文本转语音 | | -| Azure TTS | ✔ | 文本转语音 | Microsoft Azure TTS | +**大模型服务** + +| 名称 | 支持性 | 备注 | +| -------- | ------- | ------- | +| OpenAI | ✔ | 支持任何兼容 OpenAI API 的服务 | +| Anthropic | ✔ | | +| Google Gemini | ✔ | | +| Moonshot AI | ✔ | | +| 智谱 AI | ✔ | | +| DeepSeek | ✔ | | +| Ollama | ✔ | 本地部署 DeepSeek 等开源语言模型 | +| LM Studio | ✔ | 本地部署 DeepSeek 等开源语言模型 | +| [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | ✔ | | +| [302.AI](https://share.302.ai/rr1M3l) | ✔ | | +| [小马算力](https://www.tokenpony.cn/3YPyf) | ✔ | | +| 硅基流动 | ✔ | | +| PPIO 派欧云 | ✔ | | +| ModelScope | ✔ | | +| OneAPI | ✔ | | +| Dify | ✔ | | +| 阿里云百炼应用 | ✔ | | +| Coze | ✔ | | + +**语音转文本服务** + +| 名称 | 支持性 | 备注 | +| -------- | ------- | ------- | +| Whisper | ✔ | 支持 API、本地部署 | +| SenseVoice | ✔ | 本地部署 | + +**文本转语音服务** + +| 名称 | 支持性 | 备注 | +| -------- | ------- | ------- | +| OpenAI TTS | ✔ | | +| Gemini TTS | ✔ | | +| GSVI | ✔ | GPT-Sovits-Inference | +| GPT-SoVITs | ✔ | GPT-Sovits | +| FishAudio | ✔ | | +| Edge TTS | ✔ | Edge 浏览器的免费 TTS | +| 阿里云百炼 TTS | ✔ | | +| Azure TTS | ✔ | | +| Minimax TTS | ✔ | | +| 火山引擎 TTS | ✔ | | ## ❤️ 贡献 @@ -169,7 +210,7 @@ uv run main.py AstrBot 使用 `ruff` 进行代码格式化和检查。 ```bash -git clone https://github.com/Soulter/AstrBot +git clone https://github.com/AstrBotDevs/AstrBot pip install pre-commit pre-commit install ``` @@ -186,23 +227,14 @@ pre-commit install - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 伟大的猫猫框架 -另外,一些同类型其他的活跃开源 Bot 项目: - -- [nonebot/nonebot2](https://github.com/nonebot/nonebot2) - 扩展性极强的 Bot 框架 -- [koishijs/koishi](https://github.com/koishijs/koishi) - 扩展性极强的 Bot 框架 -- [MaiM-with-u/MaiBot](https://github.com/MaiM-with-u/MaiBot) - 注重拟人功能的 ChatBot -- [langbot-app/LangBot](https://github.com/langbot-app/LangBot) - 功能丰富的 Bot 平台 -- [KroMiose/nekro-agent](https://github.com/KroMiose/nekro-agent) - 注重 Agent 的 ChatBot -- [zhenxun-org/zhenxun_bot](https://github.com/zhenxun-org/zhenxun_bot) - 功能完善的 ChatBot - ## ⭐ Star History > [!TIP] -> 如果本项目对您的生活 / 工作产生了帮助,或者您关注本项目的未来发展,请给项目 Star,这是我维护这个开源项目的动力 <3 +> 如果本项目对您的生活 / 工作产生了帮助,或者您关注本项目的未来发展,请给项目 Star,这是我们维护这个开源项目的动力 <3
-[![Star History Chart](https://api.star-history.com/svg?repos=soulter/astrbot&type=Date)](https://star-history.com/#soulter/astrbot&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
diff --git a/README_en.md b/README_en.md index 249dd5e79..bed627896 100644 --- a/README_en.md +++ b/README_en.md @@ -10,16 +10,16 @@ _✨ Easy-to-use Multi-platform LLM Chatbot & Development Framework ✨_ Soulter%2FAstrBot | Trendshift -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Soulter/AstrBot)](https://github.com/Soulter/AstrBot/releases/latest) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/AstrBotDevs/AstrBot)](https://github.com/AstrBotDevs/AstrBot/releases/latest) python -Docker pull +Docker pull Static Badge [![wakatime](https://wakatime.com/badge/user/915e5316-99c6-4563-a483-ef186cf000c9/project/018e705a-a1a7-409a-a849-3013485e6c8e.svg)](https://wakatime.com/badge/user/915e5316-99c6-4563-a483-ef186cf000c9/project/018e705a-a1a7-409a-a849-3013485e6c8e) ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fstats&query=v&label=7%E6%97%A5%E6%B6%88%E6%81%AF%E4%B8%8A%E8%A1%8C%E9%87%8F&cacheSeconds=3600) -[![codecov](https://codecov.io/gh/Soulter/AstrBot/graph/badge.svg?token=FF3P5967B8)](https://codecov.io/gh/Soulter/AstrBot) +[![codecov](https://codecov.io/gh/AstrBotDevs/AstrBot/graph/badge.svg?token=FF3P5967B8)](https://codecov.io/gh/AstrBotDevs/AstrBot) Documentation | -Issue Tracking +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. @@ -49,7 +49,7 @@ Requires Python (>3.10). See docs: [Windows Installer Guide](https://astrbot.app #### Replit Deployment -[![Run on Repl.it](https://repl.it/badge/github/Soulter/AstrBot)](https://repl.it/github/Soulter/AstrBot) +[![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot) #### CasaOS Deployment @@ -67,8 +67,8 @@ See docs: [Source Code Deployment](https://astrbot.app/deploy/astrbot/cli.html) | 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](https://github.com/Soulter/astrbot_plugin_telegram) | ✔ | Private/Group chats | Text, Images | -| [WeChat Work](https://github.com/Soulter/astrbot_plugin_wecom) | ✔ | Private chats | Text, Images, Voice | +| [Telegram](https://github.com/AstrBotDevs/AstrBot_plugin_telegram) | ✔ | Private/Group chats | Text, Images | +| [WeChat Work](https://github.com/AstrBotDevs/AstrBot_plugin_wecom) | ✔ | Private chats | Text, Images, Voice | | Feishu | ✔ | Group chats | Text, Images | | WeChat Open Platform | 🚧 | Planned | - | | Discord | 🚧 | Planned | - | @@ -157,7 +157,7 @@ _✨ Built-in Web Chat Interface ✨_
-[![Star History Chart](https://api.star-history.com/svg?repos=soulter/astrbot&type=Date)](https://star-history.com/#soulter/astrbot&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=AstrBotDevs/AstrBot&type=Date)](https://star-history.com/#AstrBotDevs/AstrBot&Date)
@@ -169,7 +169,7 @@ _✨ Built-in Web Chat Interface ✨_ + + + + + + + +
+ {{ tm('help.helpPrefix') }} + {{ tm('help.documentation') }} + {{ tm('help.helpMiddle') }} + {{ tm('help.support') }}{{ tm('help.helpSuffix') }} + +
+ + + + + + + + \ No newline at end of file diff --git a/dashboard/src/components/platform/AddNewPlatform.vue b/dashboard/src/components/platform/AddNewPlatform.vue index 236a6aab7..c5cec502b 100644 --- a/dashboard/src/components/platform/AddNewPlatform.vue +++ b/dashboard/src/components/platform/AddNewPlatform.vue @@ -1,51 +1,321 @@ + - + \ No newline at end of file diff --git a/dashboard/src/components/shared/AstrBotConfig.vue b/dashboard/src/components/shared/AstrBotConfig.vue index ea8a62b80..d6c6fee9c 100644 --- a/dashboard/src/components/shared/AstrBotConfig.vue +++ b/dashboard/src/components/shared/AstrBotConfig.vue @@ -7,6 +7,8 @@ import ProviderSelector from './ProviderSelector.vue' import PersonaSelector from './PersonaSelector.vue' import KnowledgeBaseSelector from './KnowledgeBaseSelector.vue' import { useI18n } from '@/i18n/composables' +import axios from 'axios' +import { useToast } from '@/utils/toast' const props = defineProps({ metadata: { @@ -40,6 +42,7 @@ const currentEditingKey = ref('') const currentEditingLanguage = ref('json') const currentEditingTheme = ref('vs-light') let currentEditingKeyIterable = null +const loadingEmbeddingDim = ref(false) function openEditorDialog(key, value, theme, language) { currentEditingKey.value = key @@ -49,10 +52,34 @@ function openEditorDialog(key, value, theme, language) { dialog.value = true } + function saveEditedContent() { dialog.value = false } +async function getEmbeddingDimensions(providerConfig) { + if (loadingEmbeddingDim.value) return + + loadingEmbeddingDim.value = true + try { + const response = await axios.post('/api/config/provider/get_embedding_dim', { + provider_config: providerConfig + }) + + if (response.data.status != "error" && response.data.data?.embedding_dimensions) { + console.log(response.data.data.embedding_dimensions) + providerConfig.embedding_dimensions = response.data.data.embedding_dimensions + useToast().success("获取成功: " + response.data.data.embedding_dimensions) + } else { + useToast().error(response.data.message) + } + } catch (error) { + console.error('Error getting embedding dimensions:', error) + } finally { + loadingEmbeddingDim.value = false + } +} + function getValueBySelector(obj, selector) { const keys = selector.split('.') let current = obj @@ -135,7 +162,7 @@ function hasVisibleItemsAfter(items, currentIndex) {