AstrBot 3.5.27__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/docker-image.yml +18 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/PKG-INFO +33 -50
- {astrbot-3.5.27 → astrbot-4.0.0}/README.md +28 -48
- astrbot-4.0.0/astrbot/api/__init__.py +20 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/__init__.py +1 -2
- astrbot-4.0.0/astrbot/core/agent/agent.py +13 -0
- astrbot-4.0.0/astrbot/core/agent/handoff.py +34 -0
- astrbot-4.0.0/astrbot/core/agent/hooks.py +27 -0
- astrbot-4.0.0/astrbot/core/agent/mcp_client.py +208 -0
- astrbot-4.0.0/astrbot/core/agent/response.py +12 -0
- astrbot-4.0.0/astrbot/core/agent/run_context.py +17 -0
- astrbot-4.0.0/astrbot/core/agent/runners/__init__.py +3 -0
- {astrbot-3.5.27/astrbot/core/pipeline/process_stage/agent_runner → astrbot-4.0.0/astrbot/core/agent/runners}/base.py +20 -19
- astrbot-3.5.27/astrbot/core/pipeline/process_stage/agent_runner/tool_loop_agent.py → astrbot-4.0.0/astrbot/core/agent/runners/tool_loop_agent_runner.py +126 -98
- astrbot-4.0.0/astrbot/core/agent/tool.py +256 -0
- astrbot-4.0.0/astrbot/core/agent/tool_executor.py +11 -0
- astrbot-4.0.0/astrbot/core/astr_agent_context.py +11 -0
- astrbot-4.0.0/astrbot/core/astrbot_config_mgr.py +283 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/config/default.py +638 -199
- astrbot-4.0.0/astrbot/core/conversation_mgr.py +297 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/core_lifecycle.py +66 -9
- astrbot-4.0.0/astrbot/core/db/__init__.py +284 -0
- astrbot-4.0.0/astrbot/core/db/migration/helper.py +64 -0
- astrbot-4.0.0/astrbot/core/db/migration/migra_3_to_4.py +338 -0
- astrbot-3.5.27/astrbot/core/utils/shared_preferences.py → astrbot-4.0.0/astrbot/core/db/migration/shared_preferences_v3.py +3 -1
- astrbot-3.5.27/astrbot/core/db/sqlite.py → astrbot-4.0.0/astrbot/core/db/migration/sqlite_v3.py +78 -152
- astrbot-4.0.0/astrbot/core/db/po.py +244 -0
- astrbot-4.0.0/astrbot/core/db/sqlite.py +542 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/faiss_impl/vec_db.py +28 -5
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/event_bus.py +21 -19
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/message/components.py +59 -50
- astrbot-4.0.0/astrbot/core/persona_mgr.py +183 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/__init__.py +0 -3
- astrbot-4.0.0/astrbot/core/pipeline/context.py +15 -0
- astrbot-4.0.0/astrbot/core/pipeline/context_utils.py +98 -0
- astrbot-4.0.0/astrbot/core/pipeline/process_stage/method/llm_request.py +594 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/process_stage/method/star_request.py +2 -12
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/respond/stage.py +2 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/result_decorate/stage.py +10 -5
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/scheduler.py +9 -8
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/stage.py +3 -3
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/waking_check/stage.py +10 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/astr_message_event.py +15 -17
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/manager.py +5 -0
- astrbot-4.0.0/astrbot/core/platform/message_session.py +28 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/platform.py +1 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/platform_metadata.py +1 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py +26 -14
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +11 -4
- astrbot-4.0.0/astrbot/core/platform/sources/satori/satori_adapter.py +482 -0
- astrbot-4.0.0/astrbot/core/platform/sources/satori/satori_event.py +221 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/telegram/tg_adapter.py +0 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/webchat/webchat_adapter.py +1 -1
- astrbot-4.0.0/astrbot/core/platform_message_history_mgr.py +47 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/entities.py +27 -17
- astrbot-4.0.0/astrbot/core/provider/func_tool_manager.py +570 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/manager.py +115 -94
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/provider.py +25 -16
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/dashscope_source.py +1 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/dify_source.py +1 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/gemini_source.py +57 -18
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/openai_source.py +3 -3
- astrbot-4.0.0/astrbot/core/provider/sources/vllm_rerank_source.py +59 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/__init__.py +7 -5
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/context.py +73 -78
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/platform_adapter_type.py +3 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/register/__init__.py +2 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/register/star_handler.py +67 -5
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/session_llm_manager.py +42 -85
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/session_plugin_manager.py +12 -4
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/star.py +0 -24
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/star_handler.py +17 -33
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/star_manager.py +33 -51
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/star_tools.py +116 -21
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/metrics.py +4 -3
- astrbot-4.0.0/astrbot/core/utils/shared_preferences.py +180 -0
- astrbot-4.0.0/astrbot/core/utils/t2i/network_strategy.py +128 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/t2i/renderer.py +10 -6
- astrbot-4.0.0/astrbot/core/utils/t2i/template/astrbot_powershell.html +184 -0
- astrbot-4.0.0/astrbot/core/utils/t2i/template/default_template.html.bak +247 -0
- astrbot-4.0.0/astrbot/core/utils/t2i/template_manager.py +95 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/__init__.py +3 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/chat.py +83 -53
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/config.py +237 -70
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/conversation.py +26 -12
- astrbot-4.0.0/astrbot/dashboard/routes/persona.py +199 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/plugin.py +0 -105
- astrbot-4.0.0/astrbot/dashboard/routes/route.py +56 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/session_management.py +35 -199
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/stat.py +5 -1
- astrbot-4.0.0/astrbot/dashboard/routes/t2i.py +232 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/tools.py +65 -65
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/update.py +17 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/server.py +3 -0
- astrbot-4.0.0/changelogs/v4.0.0-beta.3.md +3 -0
- astrbot-4.0.0/changelogs/v4.0.0-beta.4.md +8 -0
- astrbot-4.0.0/changelogs/v4.0.0-beta.5.md +15 -0
- astrbot-4.0.0/changelogs/v4.0.0.md +24 -0
- astrbot-4.0.0/dashboard/src/assets/images/astrbot_banner.png +0 -0
- astrbot-4.0.0/dashboard/src/assets/images/platform_logos/satori.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/AstrBotConfig.vue +106 -7
- astrbot-4.0.0/dashboard/src/components/shared/AstrBotConfigV4.vue +456 -0
- astrbot-4.0.0/dashboard/src/components/shared/KnowledgeBaseSelector.vue +225 -0
- astrbot-4.0.0/dashboard/src/components/shared/ListConfigItem.vue +216 -0
- astrbot-4.0.0/dashboard/src/components/shared/MigrationDialog.vue +297 -0
- astrbot-4.0.0/dashboard/src/components/shared/PersonaSelector.vue +152 -0
- astrbot-4.0.0/dashboard/src/components/shared/PluginSetSelector.vue +226 -0
- astrbot-4.0.0/dashboard/src/components/shared/ProviderSelector.vue +167 -0
- astrbot-4.0.0/dashboard/src/components/shared/T2ITemplateEditor.vue +546 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/loader.ts +2 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/core/navigation.json +2 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/alkaid/knowledge-base.json +36 -18
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/extension.json +0 -15
- astrbot-4.0.0/dashboard/src/i18n/locales/en-US/features/migration.json +18 -0
- astrbot-4.0.0/dashboard/src/i18n/locales/en-US/features/persona.json +67 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/platform.json +5 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/provider.json +4 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/settings.json +5 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/tool-use.json +8 -3
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/core/navigation.json +4 -3
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/knowledge-base.json +37 -19
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/config.json +5 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/extension.json +0 -15
- astrbot-4.0.0/dashboard/src/i18n/locales/zh-CN/features/migration.json +18 -0
- astrbot-4.0.0/dashboard/src/i18n/locales/zh-CN/features/persona.json +67 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/platform.json +5 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/provider.json +5 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/settings.json +5 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/tool-use.json +46 -5
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/translations.ts +10 -2
- astrbot-4.0.0/dashboard/src/layouts/full/FullLayout.vue +59 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/layouts/full/vertical-header/VerticalHeader.vue +3 -1
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/layouts/full/vertical-sidebar/VerticalSidebar.vue +1 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts +13 -14
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/router/MainRoutes.ts +30 -20
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VTextField.scss +4 -14
- astrbot-4.0.0/dashboard/src/views/AboutPage.vue +40 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ChatPage.vue +69 -57
- astrbot-4.0.0/dashboard/src/views/ConfigPage.vue +1168 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ExtensionPage.vue +11 -197
- astrbot-4.0.0/dashboard/src/views/PersonaPage.vue +807 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/PlatformPage.vue +95 -20
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ProviderPage.vue +28 -94
- astrbot-4.0.0/dashboard/src/views/Settings.vue +61 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ToolUsePage.vue +192 -414
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/alkaid/KnowledgeBase.vue +541 -94
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/astrbot/long_term_memory.py +60 -35
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/astrbot/main.py +115 -115
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/python_interpreter/main.py +4 -4
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/session_controller/main.py +8 -7
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/thinking_filter/main.py +4 -6
- astrbot-4.0.0/packages/web_searcher/main.py +352 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/pyproject.toml +5 -2
- {astrbot-3.5.27 → astrbot-4.0.0}/requirements.txt +4 -1
- astrbot-4.0.0/uv.lock +3407 -0
- astrbot-3.5.27/astrbot/api/__init__.py +0 -7
- astrbot-3.5.27/astrbot/core/conversation_mgr.py +0 -209
- astrbot-3.5.27/astrbot/core/db/__init__.py +0 -161
- astrbot-3.5.27/astrbot/core/db/po.py +0 -89
- astrbot-3.5.27/astrbot/core/db/sqlite_init.sql +0 -50
- astrbot-3.5.27/astrbot/core/pipeline/context.py +0 -113
- astrbot-3.5.27/astrbot/core/pipeline/platform_compatibility/stage.py +0 -56
- astrbot-3.5.27/astrbot/core/pipeline/process_stage/method/llm_request.py +0 -373
- astrbot-3.5.27/astrbot/core/provider/func_tool_manager.py +0 -758
- astrbot-3.5.27/astrbot/core/utils/t2i/network_strategy.py +0 -81
- astrbot-3.5.27/astrbot/dashboard/routes/route.py +0 -37
- astrbot-3.5.27/dashboard/src/assets/images/logo-normal.svg +0 -40
- astrbot-3.5.27/dashboard/src/assets/images/logo-waifu.png +0 -0
- astrbot-3.5.27/dashboard/src/components/shared/ListConfigItem.vue +0 -135
- astrbot-3.5.27/dashboard/src/layouts/full/FullLayout.vue +0 -25
- astrbot-3.5.27/dashboard/src/views/AboutPage.vue +0 -244
- astrbot-3.5.27/dashboard/src/views/AlkaidPage_sigma.vue +0 -438
- astrbot-3.5.27/dashboard/src/views/ConfigPage.vue +0 -280
- astrbot-3.5.27/dashboard/src/views/Settings.vue +0 -48
- astrbot-3.5.27/packages/web_searcher/main.py +0 -150
- astrbot-3.5.27/uv.lock +0 -2747
- {astrbot-3.5.27 → astrbot-4.0.0}/.dockerignore +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/FUNDING.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/copilot-instructions.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/dependabot.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/auto_release.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/codeql.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/coverage_test.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/dashboard_ci.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.github/workflows/stale.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.gitignore +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.pre-commit-config.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/.python-version +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/CODE_OF_CONDUCT.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/Dockerfile +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/Dockerfile_with_node +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/LICENSE +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/README_en.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/README_ja.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/all.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/event/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/event/filter/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/message_components.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/platform/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/provider/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/star/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/api/util/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/__main__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/commands/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/commands/cmd_conf.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/commands/cmd_init.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/commands/cmd_plug.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/commands/cmd_run.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/utils/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/utils/basic.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/utils/plugin.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/cli/utils/version_comparator.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/config/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/config/astrbot_config.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/base.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/faiss_impl/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/faiss_impl/document_storage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/faiss_impl/embedding_storage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/db/vec_db/faiss_impl/sqlite_init.sql +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/file_token_service.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/initial_loader.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/log.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/message/message_event_result.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/content_safety_check/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/content_safety_check/strategies/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/content_safety_check/strategies/baidu_aip.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/content_safety_check/strategies/keywords.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/content_safety_check/strategies/strategy.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/preprocess_stage/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/process_stage/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/rate_limit_check/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/session_status_check/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/pipeline/whitelist_check/stage.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/astrbot_message.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/message_type.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/register.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/dingtalk/dingtalk_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/dingtalk/dingtalk_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/discord/client.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/discord/components.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/discord/discord_platform_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/discord/discord_platform_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/lark/lark_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/lark/lark_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/slack/client.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/slack/slack_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/slack/slack_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/telegram/tg_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/webchat/webchat_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/webchat/webchat_queue_mgr.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_message_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wechatpadpro/xml_data_parser.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wecom/wecom_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wecom/wecom_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wecom/wecom_kf.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/wecom/wecom_kf_message.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/weixin_official_account/weixin_offacc_adapter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/platform/sources/weixin_official_account/weixin_offacc_event.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/entites.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/register.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/anthropic_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/azure_tts_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/dashscope_tts.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/edge_tts_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/fishaudio_tts_api_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/gemini_embedding_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/gemini_tts_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/gsv_selfhosted_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/gsvi_tts_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/minimax_tts_api_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/openai_embedding_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/openai_tts_api_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/sensevoice_selfhosted_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/volcengine_tts.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/whisper_api_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/whisper_selfhosted_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/provider/sources/zhipu_source.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/README.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/config.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/command.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/command_group.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/custom_filter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/event_message_type.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/permission.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/filter/regex.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/register/star.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/star/updator.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/updator.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/astrbot_path.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/command_parser.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/dify_api_client.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/io.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/log_pipe.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/path_util.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/pip_installer.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/session_lock.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/session_waiter.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/t2i/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/t2i/local_strategy.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/t2i/template/base.html +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/tencent_record_helper.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/utils/version_comparator.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/core/zip_updator.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/auth.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/file.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/log.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/astrbot/dashboard/routes/static_file.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.0.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.1.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.10.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.11.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.12.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.13.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.14.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.15.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.16.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.17.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.18.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.19.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.20.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.21.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.22.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.23.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.24.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.25.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.26.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.27.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.28.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.29.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.3.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.30.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.31.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.32.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.33.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.35.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.36.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.37.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.38.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.39.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.4.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.5.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.6.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.7.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.8.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.4.9.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.0.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.1.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.10.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.11.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.12.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.13.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.14.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.15.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.16.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.17.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.18.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.19.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.2.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.20.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.21.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.22.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.23.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.24.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.25.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.26.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.27.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.3.1.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.3.2.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.3.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.4.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.5.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.6.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.7.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.8.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/changelogs/v3.5.9.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/compose.yml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/.gitignore +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/LICENSE +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/README.md +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/env.d.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/index.html +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/public/_redirects +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/public/favicon.svg +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/App.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/astrbot_logo_mini.webp +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/dingtalk.svg +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/discord.svg +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/kook.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/lark.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/qq.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/slack.svg +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/telegram.svg +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/vocechat.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/wechat.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/assets/images/platform_logos/wecom.png +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/ConfirmDialog.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/chat/ProviderModelSelector.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ConsoleDisplayer.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ExtensionCard.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ItemCard.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ItemCardGrid.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/LanguageSwitcher.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/Logo.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ProxySelector.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/ReadmeDialog.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/UiParentCard.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/components/shared/WaitingForRestart.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/config.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/composables.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/core/actions.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/core/common.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/core/header.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/core/status.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/about.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/alkaid/index.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/alkaid/memory.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/auth.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/chart.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/chat.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/config.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/console.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/conversation.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/dashboard.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/features/session-management.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/messages/errors.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/messages/success.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/en-US/messages/validation.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/core/actions.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/core/common.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/core/header.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/core/status.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/about.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/index.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/alkaid/memory.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/auth.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/chart.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/chat.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/console.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/conversation.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/dashboard.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/features/session-management.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/messages/errors.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/messages/success.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/locales/zh-CN/messages/validation.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/tools/index.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/types.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/i18n/validator.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/layouts/blank/BlankLayout.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/main.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/plugins/confirmPlugin.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/plugins/vuetify.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/router/AuthRoutes.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/router/ChatBoxRoutes.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/router/index.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/_override.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/_variables.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VButtons.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VCard.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VField.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VInput.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VNavigationDrawer.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VScrollbar.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VShadow.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/components/_VTabs.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/layout/_container.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/layout/_sidebar.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/pages/_dashboards.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/scss/style.scss +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/stores/auth.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/stores/common.js +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/stores/customizer.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/theme/DarkTheme.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/theme/LightTheme.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/types/themeTypes/ThemeType.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/types/vue3-print-nb.d.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/types/vue_tabler_icon.d.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/AlkaidPage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ChatBoxPage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ConsolePage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/ConversationPage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/SessionManagementPage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/alkaid/LongTermMemory.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/alkaid/Other.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/authentication/auth/LoginPage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/authentication/authForms/AuthLogin.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/DefaultDashboard.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/MemoryUsage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/MessageStat.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/OnlinePlatform.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/OnlineTime.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/PlatformStat.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/RunningTime.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/src/views/dashboards/default/components/TotalMessage.vue +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/tsconfig.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/tsconfig.vite-config.json +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/dashboard/vite.config.ts +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/main.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/astrbot/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/python_interpreter/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/python_interpreter/requirements.txt +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/python_interpreter/shared/api.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/reminder/main.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/reminder/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/session_controller/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/thinking_filter/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/web_searcher/engines/__init__.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/web_searcher/engines/bing.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/web_searcher/engines/google.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/web_searcher/engines/sogo.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/packages/web_searcher/metadata.yaml +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/samples/stt_health_check.wav +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/tests/test_dashboard.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/tests/test_main.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/tests/test_pipeline.py +0 -0
- {astrbot-3.5.27 → astrbot-4.0.0}/tests/test_plugin_manager.py +0 -0
|
@@ -27,6 +27,22 @@ jobs:
|
|
|
27
27
|
if: github.event_name == 'workflow_dispatch'
|
|
28
28
|
run: git checkout ${{ steps.get-latest-tag.outputs.latest_tag }}
|
|
29
29
|
|
|
30
|
+
- name: Check if version is pre-release
|
|
31
|
+
id: check-prerelease
|
|
32
|
+
run: |
|
|
33
|
+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
|
34
|
+
version="${{ steps.get-latest-tag.outputs.latest_tag }}"
|
|
35
|
+
else
|
|
36
|
+
version="${{ github.ref_name }}"
|
|
37
|
+
fi
|
|
38
|
+
if [[ "$version" == *"beta"* ]] || [[ "$version" == *"alpha"* ]]; then
|
|
39
|
+
echo "is_prerelease=true" >> $GITHUB_OUTPUT
|
|
40
|
+
echo "Version $version is a pre-release, will not push latest tag"
|
|
41
|
+
else
|
|
42
|
+
echo "is_prerelease=false" >> $GITHUB_OUTPUT
|
|
43
|
+
echo "Version $version is a stable release, will push latest tag"
|
|
44
|
+
fi
|
|
45
|
+
|
|
30
46
|
- name: Build Dashboard
|
|
31
47
|
run: |
|
|
32
48
|
cd dashboard
|
|
@@ -64,9 +80,9 @@ jobs:
|
|
|
64
80
|
platforms: linux/amd64,linux/arm64
|
|
65
81
|
push: true
|
|
66
82
|
tags: |
|
|
67
|
-
${{
|
|
83
|
+
${{ steps.check-prerelease.outputs.is_prerelease == 'false' && format('{0}/astrbot:latest', secrets.DOCKER_HUB_USERNAME) || '' }}
|
|
68
84
|
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
|
|
69
|
-
ghcr.io/soulter/astrbot:latest
|
|
85
|
+
${{ steps.check-prerelease.outputs.is_prerelease == 'false' && 'ghcr.io/soulter/astrbot:latest' || '' }}
|
|
70
86
|
ghcr.io/soulter/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
|
|
71
87
|
|
|
72
88
|
- name: Post build notifications
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AstrBot
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: 易上手的多平台 LLM 聊天机器人及开发框架
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -17,9 +17,10 @@ Requires-Dist: colorlog>=6.9.0
|
|
|
17
17
|
Requires-Dist: cryptography>=44.0.3
|
|
18
18
|
Requires-Dist: dashscope>=1.23.2
|
|
19
19
|
Requires-Dist: defusedxml>=0.7.1
|
|
20
|
+
Requires-Dist: deprecated>=1.2.18
|
|
20
21
|
Requires-Dist: dingtalk-stream>=0.22.1
|
|
21
22
|
Requires-Dist: docstring-parser>=0.16
|
|
22
|
-
Requires-Dist: faiss-cpu
|
|
23
|
+
Requires-Dist: faiss-cpu==1.10.0
|
|
23
24
|
Requires-Dist: filelock>=3.18.0
|
|
24
25
|
Requires-Dist: google-genai>=1.14.0
|
|
25
26
|
Requires-Dist: googlesearch-python>=1.3.0
|
|
@@ -41,6 +42,8 @@ Requires-Dist: quart>=0.20.0
|
|
|
41
42
|
Requires-Dist: readability-lxml>=0.8.4.1
|
|
42
43
|
Requires-Dist: silk-python>=0.2.6
|
|
43
44
|
Requires-Dist: slack-sdk>=3.35.0
|
|
45
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.41
|
|
46
|
+
Requires-Dist: sqlmodel>=0.0.24
|
|
44
47
|
Requires-Dist: telegramify-markdown>=0.5.1
|
|
45
48
|
Requires-Dist: watchfiles>=1.0.5
|
|
46
49
|
Requires-Dist: websockets>=15.0.1
|
|
@@ -55,8 +58,6 @@ Description-Content-Type: text/markdown
|
|
|
55
58
|
|
|
56
59
|
<div align="center">
|
|
57
60
|
|
|
58
|
-
_✨ 易上手的多平台 LLM 聊天机器人及开发框架 ✨_
|
|
59
|
-
|
|
60
61
|
<a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
61
62
|
|
|
62
63
|
[](https://github.com/Soulter/AstrBot/releases/latest)
|
|
@@ -76,7 +77,7 @@ _✨ 易上手的多平台 LLM 聊天机器人及开发框架 ✨_
|
|
|
76
77
|
|
|
77
78
|
AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架。
|
|
78
79
|
|
|
79
|
-
##
|
|
80
|
+
## 主要功能
|
|
80
81
|
|
|
81
82
|
1. **大模型对话**。支持接入多种大模型服务。支持多模态、工具调用、MCP、原生知识库、人设等功能。
|
|
82
83
|
2. **多消息平台支持**。支持接入 QQ、企业微信、微信公众号、飞书、Telegram、钉钉、Discord、KOOK 等平台。支持速率限制、白名单、百度内容审核。
|
|
@@ -84,7 +85,7 @@ AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架
|
|
|
84
85
|
4. **插件扩展**。深度优化的插件机制,支持[开发插件](https://astrbot.app/dev/plugin.html)扩展功能,社区插件生态丰富。
|
|
85
86
|
5. **WebUI**。可视化配置和管理机器人,功能齐全。
|
|
86
87
|
|
|
87
|
-
##
|
|
88
|
+
## 部署方式
|
|
88
89
|
|
|
89
90
|
#### Docker 部署
|
|
90
91
|
|
|
@@ -128,9 +129,7 @@ AstrBot 已由雨云官方上架至云应用平台,可一键部署。
|
|
|
128
129
|
|
|
129
130
|
#### 手动部署
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
首先,安装 uv:
|
|
132
|
+
首先安装 uv:
|
|
134
133
|
|
|
135
134
|
```bash
|
|
136
135
|
pip install uv
|
|
@@ -145,6 +144,26 @@ uv run main.py
|
|
|
145
144
|
|
|
146
145
|
或者请参阅官方文档 [通过源码部署 AstrBot](https://astrbot.app/deploy/astrbot/cli.html) 。
|
|
147
146
|
|
|
147
|
+
## 🌍 社区
|
|
148
|
+
|
|
149
|
+
### QQ 群组
|
|
150
|
+
|
|
151
|
+
- 1 群:322154837
|
|
152
|
+
- 3 群:630166526
|
|
153
|
+
- 5 群:822130018
|
|
154
|
+
- 6 群:753075035
|
|
155
|
+
- 开发者群:753075035
|
|
156
|
+
- 开发者群(备份):295657329
|
|
157
|
+
|
|
158
|
+
### Telegram 群组
|
|
159
|
+
|
|
160
|
+
<a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
|
|
161
|
+
|
|
162
|
+
### Discord 群组
|
|
163
|
+
|
|
164
|
+
<a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
|
|
165
|
+
|
|
166
|
+
|
|
148
167
|
## ⚡ 消息平台支持情况
|
|
149
168
|
|
|
150
169
|
| 平台 | 支持性 |
|
|
@@ -161,22 +180,18 @@ uv run main.py
|
|
|
161
180
|
| Discord | ✔ |
|
|
162
181
|
| [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | ✔ |
|
|
163
182
|
| [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | ✔ |
|
|
164
|
-
| 微信对话开放平台 | 🚧 |
|
|
165
|
-
| WhatsApp | 🚧 |
|
|
166
|
-
| 小爱音响 | 🚧 |
|
|
167
183
|
|
|
168
184
|
## ⚡ 提供商支持情况
|
|
169
185
|
|
|
170
186
|
| 名称 | 支持性 | 类型 | 备注 |
|
|
171
187
|
| -------- | ------- | ------- | ------- |
|
|
172
|
-
| OpenAI
|
|
173
|
-
|
|
|
174
|
-
| Google Gemini
|
|
188
|
+
| OpenAI | ✔ | 文本生成 | 支持任何兼容 OpenAI API 的服务 |
|
|
189
|
+
| Anthropic | ✔ | 文本生成 | |
|
|
190
|
+
| Google Gemini | ✔ | 文本生成 | |
|
|
175
191
|
| Dify | ✔ | LLMOps | |
|
|
176
192
|
| 阿里云百炼应用 | ✔ | LLMOps | |
|
|
177
193
|
| Ollama | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 |
|
|
178
194
|
| LM Studio | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 |
|
|
179
|
-
| LLMTuner | ✔ | 模型加载器 | 本地加载 lora 等微调模型 |
|
|
180
195
|
| [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | ✔ | 模型 API 及算力服务平台 | |
|
|
181
196
|
| [302.AI](https://share.302.ai/rr1M3l) | ✔ | 模型 API 服务平台 | |
|
|
182
197
|
| 硅基流动 | ✔ | 模型 API 服务平台 | |
|
|
@@ -192,7 +207,6 @@ uv run main.py
|
|
|
192
207
|
| 阿里云百炼 TTS | ✔ | 文本转语音 | |
|
|
193
208
|
| Azure TTS | ✔ | 文本转语音 | Microsoft Azure TTS |
|
|
194
209
|
|
|
195
|
-
|
|
196
210
|
## ❤️ 贡献
|
|
197
211
|
|
|
198
212
|
欢迎任何 Issues/Pull Requests!只需要将你的更改提交到此项目 :)
|
|
@@ -211,38 +225,6 @@ pip install pre-commit
|
|
|
211
225
|
pre-commit install
|
|
212
226
|
```
|
|
213
227
|
|
|
214
|
-
## 🌟 支持
|
|
215
|
-
|
|
216
|
-
- Star 这个项目!
|
|
217
|
-
- 在[爱发电](https://afdian.com/a/soulter)支持我!
|
|
218
|
-
|
|
219
|
-
## ✨ Demo
|
|
220
|
-
|
|
221
|
-
<details><summary>👉 点击展开多张 Demo 截图 👈</summary>
|
|
222
|
-
|
|
223
|
-
<div align='center'>
|
|
224
|
-
|
|
225
|
-
<img src="https://github.com/user-attachments/assets/4ee688d9-467d-45c8-99d6-368f9a8a92d8" width="600">
|
|
226
|
-
|
|
227
|
-
_✨基于 Docker 的沙箱化代码执行器(Beta 测试)✨_
|
|
228
|
-
|
|
229
|
-
<img src="https://github.com/user-attachments/assets/0378f407-6079-4f64-ae4c-e97ab20611d2" height=500>
|
|
230
|
-
|
|
231
|
-
_✨ 多模态、网页搜索、长文本转图片(可配置) ✨_
|
|
232
|
-
|
|
233
|
-
<img src="https://github.com/user-attachments/assets/e137a9e1-340a-4bf2-bb2b-771132780735" height=150>
|
|
234
|
-
<img src="https://github.com/user-attachments/assets/480f5e82-cf6a-4955-a869-0d73137aa6e1" height=150>
|
|
235
|
-
|
|
236
|
-
_✨ 插件系统——部分插件展示 ✨_
|
|
237
|
-
|
|
238
|
-
<img src="https://github.com/user-attachments/assets/0cdbf564-2f59-4da5-b524-ce0e7ef3d978" width=600>
|
|
239
|
-
|
|
240
|
-
_✨ WebUI ✨_
|
|
241
|
-
|
|
242
|
-
</div>
|
|
243
|
-
|
|
244
|
-
</details>
|
|
245
|
-
|
|
246
228
|
|
|
247
229
|
## ❤️ Special Thanks
|
|
248
230
|
|
|
@@ -268,7 +250,8 @@ _✨ WebUI ✨_
|
|
|
268
250
|
|
|
269
251
|
</div>
|
|
270
252
|
|
|
271
|
-
|
|
253
|
+
|
|
254
|
+
</details>
|
|
272
255
|
|
|
273
256
|
|
|
274
257
|
_私は、高性能ですから!_
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
9
|
-
_✨ 易上手的多平台 LLM 聊天机器人及开发框架 ✨_
|
|
10
|
-
|
|
11
9
|
<a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
12
10
|
|
|
13
11
|
[](https://github.com/Soulter/AstrBot/releases/latest)
|
|
@@ -27,7 +25,7 @@ _✨ 易上手的多平台 LLM 聊天机器人及开发框架 ✨_
|
|
|
27
25
|
|
|
28
26
|
AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架。
|
|
29
27
|
|
|
30
|
-
##
|
|
28
|
+
## 主要功能
|
|
31
29
|
|
|
32
30
|
1. **大模型对话**。支持接入多种大模型服务。支持多模态、工具调用、MCP、原生知识库、人设等功能。
|
|
33
31
|
2. **多消息平台支持**。支持接入 QQ、企业微信、微信公众号、飞书、Telegram、钉钉、Discord、KOOK 等平台。支持速率限制、白名单、百度内容审核。
|
|
@@ -35,7 +33,7 @@ AstrBot 是一个开源的一站式 Agentic 聊天机器人平台及开发框架
|
|
|
35
33
|
4. **插件扩展**。深度优化的插件机制,支持[开发插件](https://astrbot.app/dev/plugin.html)扩展功能,社区插件生态丰富。
|
|
36
34
|
5. **WebUI**。可视化配置和管理机器人,功能齐全。
|
|
37
35
|
|
|
38
|
-
##
|
|
36
|
+
## 部署方式
|
|
39
37
|
|
|
40
38
|
#### Docker 部署
|
|
41
39
|
|
|
@@ -79,9 +77,7 @@ AstrBot 已由雨云官方上架至云应用平台,可一键部署。
|
|
|
79
77
|
|
|
80
78
|
#### 手动部署
|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
首先,安装 uv:
|
|
80
|
+
首先安装 uv:
|
|
85
81
|
|
|
86
82
|
```bash
|
|
87
83
|
pip install uv
|
|
@@ -96,6 +92,26 @@ uv run main.py
|
|
|
96
92
|
|
|
97
93
|
或者请参阅官方文档 [通过源码部署 AstrBot](https://astrbot.app/deploy/astrbot/cli.html) 。
|
|
98
94
|
|
|
95
|
+
## 🌍 社区
|
|
96
|
+
|
|
97
|
+
### QQ 群组
|
|
98
|
+
|
|
99
|
+
- 1 群:322154837
|
|
100
|
+
- 3 群:630166526
|
|
101
|
+
- 5 群:822130018
|
|
102
|
+
- 6 群:753075035
|
|
103
|
+
- 开发者群:753075035
|
|
104
|
+
- 开发者群(备份):295657329
|
|
105
|
+
|
|
106
|
+
### Telegram 群组
|
|
107
|
+
|
|
108
|
+
<a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
|
|
109
|
+
|
|
110
|
+
### Discord 群组
|
|
111
|
+
|
|
112
|
+
<a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
|
|
113
|
+
|
|
114
|
+
|
|
99
115
|
## ⚡ 消息平台支持情况
|
|
100
116
|
|
|
101
117
|
| 平台 | 支持性 |
|
|
@@ -112,22 +128,18 @@ uv run main.py
|
|
|
112
128
|
| Discord | ✔ |
|
|
113
129
|
| [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | ✔ |
|
|
114
130
|
| [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | ✔ |
|
|
115
|
-
| 微信对话开放平台 | 🚧 |
|
|
116
|
-
| WhatsApp | 🚧 |
|
|
117
|
-
| 小爱音响 | 🚧 |
|
|
118
131
|
|
|
119
132
|
## ⚡ 提供商支持情况
|
|
120
133
|
|
|
121
134
|
| 名称 | 支持性 | 类型 | 备注 |
|
|
122
135
|
| -------- | ------- | ------- | ------- |
|
|
123
|
-
| OpenAI
|
|
124
|
-
|
|
|
125
|
-
| Google Gemini
|
|
136
|
+
| OpenAI | ✔ | 文本生成 | 支持任何兼容 OpenAI API 的服务 |
|
|
137
|
+
| Anthropic | ✔ | 文本生成 | |
|
|
138
|
+
| Google Gemini | ✔ | 文本生成 | |
|
|
126
139
|
| Dify | ✔ | LLMOps | |
|
|
127
140
|
| 阿里云百炼应用 | ✔ | LLMOps | |
|
|
128
141
|
| Ollama | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 |
|
|
129
142
|
| LM Studio | ✔ | 模型加载器 | 本地部署 DeepSeek、Llama 等开源语言模型 |
|
|
130
|
-
| LLMTuner | ✔ | 模型加载器 | 本地加载 lora 等微调模型 |
|
|
131
143
|
| [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | ✔ | 模型 API 及算力服务平台 | |
|
|
132
144
|
| [302.AI](https://share.302.ai/rr1M3l) | ✔ | 模型 API 服务平台 | |
|
|
133
145
|
| 硅基流动 | ✔ | 模型 API 服务平台 | |
|
|
@@ -143,7 +155,6 @@ uv run main.py
|
|
|
143
155
|
| 阿里云百炼 TTS | ✔ | 文本转语音 | |
|
|
144
156
|
| Azure TTS | ✔ | 文本转语音 | Microsoft Azure TTS |
|
|
145
157
|
|
|
146
|
-
|
|
147
158
|
## ❤️ 贡献
|
|
148
159
|
|
|
149
160
|
欢迎任何 Issues/Pull Requests!只需要将你的更改提交到此项目 :)
|
|
@@ -162,38 +173,6 @@ pip install pre-commit
|
|
|
162
173
|
pre-commit install
|
|
163
174
|
```
|
|
164
175
|
|
|
165
|
-
## 🌟 支持
|
|
166
|
-
|
|
167
|
-
- Star 这个项目!
|
|
168
|
-
- 在[爱发电](https://afdian.com/a/soulter)支持我!
|
|
169
|
-
|
|
170
|
-
## ✨ Demo
|
|
171
|
-
|
|
172
|
-
<details><summary>👉 点击展开多张 Demo 截图 👈</summary>
|
|
173
|
-
|
|
174
|
-
<div align='center'>
|
|
175
|
-
|
|
176
|
-
<img src="https://github.com/user-attachments/assets/4ee688d9-467d-45c8-99d6-368f9a8a92d8" width="600">
|
|
177
|
-
|
|
178
|
-
_✨基于 Docker 的沙箱化代码执行器(Beta 测试)✨_
|
|
179
|
-
|
|
180
|
-
<img src="https://github.com/user-attachments/assets/0378f407-6079-4f64-ae4c-e97ab20611d2" height=500>
|
|
181
|
-
|
|
182
|
-
_✨ 多模态、网页搜索、长文本转图片(可配置) ✨_
|
|
183
|
-
|
|
184
|
-
<img src="https://github.com/user-attachments/assets/e137a9e1-340a-4bf2-bb2b-771132780735" height=150>
|
|
185
|
-
<img src="https://github.com/user-attachments/assets/480f5e82-cf6a-4955-a869-0d73137aa6e1" height=150>
|
|
186
|
-
|
|
187
|
-
_✨ 插件系统——部分插件展示 ✨_
|
|
188
|
-
|
|
189
|
-
<img src="https://github.com/user-attachments/assets/0cdbf564-2f59-4da5-b524-ce0e7ef3d978" width=600>
|
|
190
|
-
|
|
191
|
-
_✨ WebUI ✨_
|
|
192
|
-
|
|
193
|
-
</div>
|
|
194
|
-
|
|
195
|
-
</details>
|
|
196
|
-
|
|
197
176
|
|
|
198
177
|
## ❤️ Special Thanks
|
|
199
178
|
|
|
@@ -219,7 +198,8 @@ _✨ WebUI ✨_
|
|
|
219
198
|
|
|
220
199
|
</div>
|
|
221
200
|
|
|
222
|
-
|
|
201
|
+
|
|
202
|
+
</details>
|
|
223
203
|
|
|
224
204
|
|
|
225
205
|
_私は、高性能ですから!_
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from astrbot.core.config.astrbot_config import AstrBotConfig
|
|
2
|
+
from astrbot import logger
|
|
3
|
+
from astrbot.core import html_renderer
|
|
4
|
+
from astrbot.core import sp
|
|
5
|
+
from astrbot.core.star.register import register_llm_tool as llm_tool
|
|
6
|
+
from astrbot.core.star.register import register_agent as agent
|
|
7
|
+
from astrbot.core.agent.tool import ToolSet, FunctionTool
|
|
8
|
+
from astrbot.core.agent.tool_executor import BaseFunctionToolExecutor
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"AstrBotConfig",
|
|
12
|
+
"logger",
|
|
13
|
+
"html_renderer",
|
|
14
|
+
"llm_tool",
|
|
15
|
+
"agent",
|
|
16
|
+
"sp",
|
|
17
|
+
"ToolSet",
|
|
18
|
+
"FunctionTool",
|
|
19
|
+
"BaseFunctionToolExecutor",
|
|
20
|
+
]
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import os
|
|
2
|
-
import asyncio
|
|
3
2
|
from .log import LogManager, LogBroker # noqa
|
|
4
3
|
from astrbot.core.utils.t2i.renderer import HtmlRenderer
|
|
5
4
|
from astrbot.core.utils.shared_preferences import SharedPreferences
|
|
@@ -21,7 +20,7 @@ html_renderer = HtmlRenderer(t2i_base_url)
|
|
|
21
20
|
logger = LogManager.GetLogger(log_name="astrbot")
|
|
22
21
|
db_helper = SQLiteDatabase(DB_PATH)
|
|
23
22
|
# 简单的偏好设置存储, 这里后续应该存储到数据库中, 一些部分可以存储到配置中
|
|
24
|
-
sp = SharedPreferences()
|
|
23
|
+
sp = SharedPreferences(db_helper=db_helper)
|
|
25
24
|
# 文件令牌服务
|
|
26
25
|
file_token_service = FileTokenService()
|
|
27
26
|
pip_installer = PipInstaller(
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from .tool import FunctionTool
|
|
3
|
+
from typing import Generic
|
|
4
|
+
from .run_context import TContext
|
|
5
|
+
from .hooks import BaseAgentRunHooks
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class Agent(Generic[TContext]):
|
|
10
|
+
name: str
|
|
11
|
+
instructions: str | None = None
|
|
12
|
+
tools: list[str, FunctionTool] | None = None
|
|
13
|
+
run_hooks: BaseAgentRunHooks[TContext] | None = None
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from typing import Generic
|
|
2
|
+
from .tool import FunctionTool
|
|
3
|
+
from .agent import Agent
|
|
4
|
+
from .run_context import TContext
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class HandoffTool(FunctionTool, Generic[TContext]):
|
|
8
|
+
"""Handoff tool for delegating tasks to another agent."""
|
|
9
|
+
|
|
10
|
+
def __init__(
|
|
11
|
+
self, agent: Agent[TContext], parameters: dict | None = None, **kwargs
|
|
12
|
+
):
|
|
13
|
+
self.agent = agent
|
|
14
|
+
super().__init__(
|
|
15
|
+
name=f"transfer_to_{agent.name}",
|
|
16
|
+
parameters=parameters or self.default_parameters(),
|
|
17
|
+
description=agent.instructions or self.default_description(agent.name),
|
|
18
|
+
**kwargs,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def default_parameters(self) -> dict:
|
|
22
|
+
return {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"input": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The input to be handed off to another agent. This should be a clear and concise request or task.",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
def default_description(self, agent_name: str | None) -> str:
|
|
33
|
+
agent_name = agent_name or "another"
|
|
34
|
+
return f"Delegate tasks to {self.name} agent to handle the request."
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import mcp
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from .run_context import ContextWrapper, TContext
|
|
4
|
+
from typing import Generic
|
|
5
|
+
from astrbot.core.provider.entities import LLMResponse
|
|
6
|
+
from astrbot.core.agent.tool import FunctionTool
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class BaseAgentRunHooks(Generic[TContext]):
|
|
11
|
+
async def on_agent_begin(self, run_context: ContextWrapper[TContext]): ...
|
|
12
|
+
async def on_tool_start(
|
|
13
|
+
self,
|
|
14
|
+
run_context: ContextWrapper[TContext],
|
|
15
|
+
tool: FunctionTool,
|
|
16
|
+
tool_args: dict | None,
|
|
17
|
+
): ...
|
|
18
|
+
async def on_tool_end(
|
|
19
|
+
self,
|
|
20
|
+
run_context: ContextWrapper[TContext],
|
|
21
|
+
tool: FunctionTool,
|
|
22
|
+
tool_args: dict | None,
|
|
23
|
+
tool_result: mcp.types.CallToolResult | None,
|
|
24
|
+
): ...
|
|
25
|
+
async def on_agent_done(
|
|
26
|
+
self, run_context: ContextWrapper[TContext], llm_response: LLMResponse
|
|
27
|
+
): ...
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import logging
|
|
3
|
+
from datetime import timedelta
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from contextlib import AsyncExitStack
|
|
6
|
+
from astrbot import logger
|
|
7
|
+
from astrbot.core.utils.log_pipe import LogPipe
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import mcp
|
|
11
|
+
from mcp.client.sse import sse_client
|
|
12
|
+
except (ModuleNotFoundError, ImportError):
|
|
13
|
+
logger.warning("警告: 缺少依赖库 'mcp',将无法使用 MCP 服务。")
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
from mcp.client.streamable_http import streamablehttp_client
|
|
17
|
+
except (ModuleNotFoundError, ImportError):
|
|
18
|
+
logger.warning(
|
|
19
|
+
"警告: 缺少依赖库 'mcp' 或者 mcp 库版本过低,无法使用 Streamable HTTP 连接方式。"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _prepare_config(config: dict) -> dict:
|
|
24
|
+
"""准备配置,处理嵌套格式"""
|
|
25
|
+
if "mcpServers" in config and config["mcpServers"]:
|
|
26
|
+
first_key = next(iter(config["mcpServers"]))
|
|
27
|
+
config = config["mcpServers"][first_key]
|
|
28
|
+
config.pop("active", None)
|
|
29
|
+
return config
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
async def _quick_test_mcp_connection(config: dict) -> tuple[bool, str]:
|
|
33
|
+
"""快速测试 MCP 服务器可达性"""
|
|
34
|
+
import aiohttp
|
|
35
|
+
|
|
36
|
+
cfg = _prepare_config(config.copy())
|
|
37
|
+
|
|
38
|
+
url = cfg["url"]
|
|
39
|
+
headers = cfg.get("headers", {})
|
|
40
|
+
timeout = cfg.get("timeout", 10)
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
async with aiohttp.ClientSession() as session:
|
|
44
|
+
if cfg.get("transport") == "streamable_http":
|
|
45
|
+
test_payload = {
|
|
46
|
+
"jsonrpc": "2.0",
|
|
47
|
+
"method": "initialize",
|
|
48
|
+
"id": 0,
|
|
49
|
+
"params": {
|
|
50
|
+
"protocolVersion": "2024-11-05",
|
|
51
|
+
"capabilities": {},
|
|
52
|
+
"clientInfo": {"name": "test-client", "version": "1.2.3"},
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
async with session.post(
|
|
56
|
+
url,
|
|
57
|
+
headers={
|
|
58
|
+
**headers,
|
|
59
|
+
"Content-Type": "application/json",
|
|
60
|
+
"Accept": "application/json, text/event-stream",
|
|
61
|
+
},
|
|
62
|
+
json=test_payload,
|
|
63
|
+
timeout=aiohttp.ClientTimeout(total=timeout),
|
|
64
|
+
) as response:
|
|
65
|
+
if response.status == 200:
|
|
66
|
+
return True, ""
|
|
67
|
+
else:
|
|
68
|
+
return False, f"HTTP {response.status}: {response.reason}"
|
|
69
|
+
else:
|
|
70
|
+
async with session.get(
|
|
71
|
+
url,
|
|
72
|
+
headers={
|
|
73
|
+
**headers,
|
|
74
|
+
"Accept": "application/json, text/event-stream",
|
|
75
|
+
},
|
|
76
|
+
timeout=aiohttp.ClientTimeout(total=timeout),
|
|
77
|
+
) as response:
|
|
78
|
+
if response.status == 200:
|
|
79
|
+
return True, ""
|
|
80
|
+
else:
|
|
81
|
+
return False, f"HTTP {response.status}: {response.reason}"
|
|
82
|
+
|
|
83
|
+
except asyncio.TimeoutError:
|
|
84
|
+
return False, f"连接超时: {timeout}秒"
|
|
85
|
+
except Exception as e:
|
|
86
|
+
return False, f"{e!s}"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class MCPClient:
|
|
90
|
+
def __init__(self):
|
|
91
|
+
# Initialize session and client objects
|
|
92
|
+
self.session: Optional[mcp.ClientSession] = None
|
|
93
|
+
self.exit_stack = AsyncExitStack()
|
|
94
|
+
|
|
95
|
+
self.name = None
|
|
96
|
+
self.active: bool = True
|
|
97
|
+
self.tools: list[mcp.Tool] = []
|
|
98
|
+
self.server_errlogs: list[str] = []
|
|
99
|
+
self.running_event = asyncio.Event()
|
|
100
|
+
|
|
101
|
+
async def connect_to_server(self, mcp_server_config: dict, name: str):
|
|
102
|
+
"""连接到 MCP 服务器
|
|
103
|
+
|
|
104
|
+
如果 `url` 参数存在:
|
|
105
|
+
1. 当 transport 指定为 `streamable_http` 时,使用 Streamable HTTP 连接方式。
|
|
106
|
+
1. 当 transport 指定为 `sse` 时,使用 SSE 连接方式。
|
|
107
|
+
2. 如果没有指定,默认使用 SSE 的方式连接到 MCP 服务。
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
mcp_server_config (dict): Configuration for the MCP server. See https://modelcontextprotocol.io/quickstart/server
|
|
111
|
+
"""
|
|
112
|
+
cfg = _prepare_config(mcp_server_config.copy())
|
|
113
|
+
|
|
114
|
+
def logging_callback(msg: str):
|
|
115
|
+
# 处理 MCP 服务的错误日志
|
|
116
|
+
print(f"MCP Server {name} Error: {msg}")
|
|
117
|
+
self.server_errlogs.append(msg)
|
|
118
|
+
|
|
119
|
+
if "url" in cfg:
|
|
120
|
+
success, error_msg = await _quick_test_mcp_connection(cfg)
|
|
121
|
+
if not success:
|
|
122
|
+
raise Exception(error_msg)
|
|
123
|
+
|
|
124
|
+
if cfg.get("transport") != "streamable_http":
|
|
125
|
+
# SSE transport method
|
|
126
|
+
self._streams_context = sse_client(
|
|
127
|
+
url=cfg["url"],
|
|
128
|
+
headers=cfg.get("headers", {}),
|
|
129
|
+
timeout=cfg.get("timeout", 5),
|
|
130
|
+
sse_read_timeout=cfg.get("sse_read_timeout", 60 * 5),
|
|
131
|
+
)
|
|
132
|
+
streams = await self.exit_stack.enter_async_context(
|
|
133
|
+
self._streams_context
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
# Create a new client session
|
|
137
|
+
read_timeout = timedelta(seconds=cfg.get("session_read_timeout", 20))
|
|
138
|
+
self.session = await self.exit_stack.enter_async_context(
|
|
139
|
+
mcp.ClientSession(
|
|
140
|
+
*streams,
|
|
141
|
+
read_timeout_seconds=read_timeout,
|
|
142
|
+
logging_callback=logging_callback, # type: ignore
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
else:
|
|
146
|
+
timeout = timedelta(seconds=cfg.get("timeout", 30))
|
|
147
|
+
sse_read_timeout = timedelta(
|
|
148
|
+
seconds=cfg.get("sse_read_timeout", 60 * 5)
|
|
149
|
+
)
|
|
150
|
+
self._streams_context = streamablehttp_client(
|
|
151
|
+
url=cfg["url"],
|
|
152
|
+
headers=cfg.get("headers", {}),
|
|
153
|
+
timeout=timeout,
|
|
154
|
+
sse_read_timeout=sse_read_timeout,
|
|
155
|
+
terminate_on_close=cfg.get("terminate_on_close", True),
|
|
156
|
+
)
|
|
157
|
+
read_s, write_s, _ = await self.exit_stack.enter_async_context(
|
|
158
|
+
self._streams_context
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Create a new client session
|
|
162
|
+
read_timeout = timedelta(seconds=cfg.get("session_read_timeout", 20))
|
|
163
|
+
self.session = await self.exit_stack.enter_async_context(
|
|
164
|
+
mcp.ClientSession(
|
|
165
|
+
read_stream=read_s,
|
|
166
|
+
write_stream=write_s,
|
|
167
|
+
read_timeout_seconds=read_timeout,
|
|
168
|
+
logging_callback=logging_callback, # type: ignore
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
else:
|
|
173
|
+
server_params = mcp.StdioServerParameters(
|
|
174
|
+
**cfg,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def callback(msg: str):
|
|
178
|
+
# 处理 MCP 服务的错误日志
|
|
179
|
+
self.server_errlogs.append(msg)
|
|
180
|
+
|
|
181
|
+
stdio_transport = await self.exit_stack.enter_async_context(
|
|
182
|
+
mcp.stdio_client(
|
|
183
|
+
server_params,
|
|
184
|
+
errlog=LogPipe(
|
|
185
|
+
level=logging.ERROR,
|
|
186
|
+
logger=logger,
|
|
187
|
+
identifier=f"MCPServer-{name}",
|
|
188
|
+
callback=callback,
|
|
189
|
+
), # type: ignore
|
|
190
|
+
),
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
# Create a new client session
|
|
194
|
+
self.session = await self.exit_stack.enter_async_context(
|
|
195
|
+
mcp.ClientSession(*stdio_transport)
|
|
196
|
+
)
|
|
197
|
+
await self.session.initialize()
|
|
198
|
+
|
|
199
|
+
async def list_tools_and_save(self) -> mcp.ListToolsResult:
|
|
200
|
+
"""List all tools from the server and save them to self.tools"""
|
|
201
|
+
response = await self.session.list_tools()
|
|
202
|
+
self.tools = response.tools
|
|
203
|
+
return response
|
|
204
|
+
|
|
205
|
+
async def cleanup(self):
|
|
206
|
+
"""Clean up resources"""
|
|
207
|
+
await self.exit_stack.aclose()
|
|
208
|
+
self.running_event.set() # Set the running event to indicate cleanup is done
|