AstrBot 3.5.6__py3-none-any.whl → 4.7.0__py3-none-any.whl
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/api/__init__.py +16 -4
- astrbot/api/all.py +2 -1
- astrbot/api/event/__init__.py +5 -6
- astrbot/api/event/filter/__init__.py +37 -34
- astrbot/api/platform/__init__.py +7 -8
- astrbot/api/provider/__init__.py +8 -7
- astrbot/api/star/__init__.py +3 -4
- astrbot/api/util/__init__.py +2 -2
- astrbot/cli/__init__.py +1 -0
- astrbot/cli/__main__.py +18 -197
- astrbot/cli/commands/__init__.py +6 -0
- astrbot/cli/commands/cmd_conf.py +209 -0
- astrbot/cli/commands/cmd_init.py +56 -0
- astrbot/cli/commands/cmd_plug.py +245 -0
- astrbot/cli/commands/cmd_run.py +62 -0
- astrbot/cli/utils/__init__.py +18 -0
- astrbot/cli/utils/basic.py +76 -0
- astrbot/cli/utils/plugin.py +246 -0
- astrbot/cli/utils/version_comparator.py +90 -0
- astrbot/core/__init__.py +17 -19
- astrbot/core/agent/agent.py +14 -0
- astrbot/core/agent/handoff.py +38 -0
- astrbot/core/agent/hooks.py +30 -0
- astrbot/core/agent/mcp_client.py +385 -0
- astrbot/core/agent/message.py +175 -0
- astrbot/core/agent/response.py +14 -0
- astrbot/core/agent/run_context.py +22 -0
- astrbot/core/agent/runners/__init__.py +3 -0
- astrbot/core/agent/runners/base.py +65 -0
- astrbot/core/agent/runners/coze/coze_agent_runner.py +367 -0
- astrbot/core/agent/runners/coze/coze_api_client.py +324 -0
- astrbot/core/agent/runners/dashscope/dashscope_agent_runner.py +403 -0
- astrbot/core/agent/runners/dify/dify_agent_runner.py +336 -0
- astrbot/core/agent/runners/dify/dify_api_client.py +195 -0
- astrbot/core/agent/runners/tool_loop_agent_runner.py +400 -0
- astrbot/core/agent/tool.py +285 -0
- astrbot/core/agent/tool_executor.py +17 -0
- astrbot/core/astr_agent_context.py +19 -0
- astrbot/core/astr_agent_hooks.py +36 -0
- astrbot/core/astr_agent_run_util.py +80 -0
- astrbot/core/astr_agent_tool_exec.py +246 -0
- astrbot/core/astrbot_config_mgr.py +275 -0
- astrbot/core/config/__init__.py +2 -2
- astrbot/core/config/astrbot_config.py +60 -20
- astrbot/core/config/default.py +1972 -453
- astrbot/core/config/i18n_utils.py +110 -0
- astrbot/core/conversation_mgr.py +285 -75
- astrbot/core/core_lifecycle.py +167 -62
- astrbot/core/db/__init__.py +305 -102
- astrbot/core/db/migration/helper.py +69 -0
- astrbot/core/db/migration/migra_3_to_4.py +357 -0
- astrbot/core/db/migration/migra_45_to_46.py +44 -0
- astrbot/core/db/migration/migra_webchat_session.py +131 -0
- astrbot/core/db/migration/shared_preferences_v3.py +48 -0
- astrbot/core/db/migration/sqlite_v3.py +497 -0
- astrbot/core/db/po.py +259 -55
- astrbot/core/db/sqlite.py +773 -528
- astrbot/core/db/vec_db/base.py +73 -0
- astrbot/core/db/vec_db/faiss_impl/__init__.py +3 -0
- astrbot/core/db/vec_db/faiss_impl/document_storage.py +392 -0
- astrbot/core/db/vec_db/faiss_impl/embedding_storage.py +93 -0
- astrbot/core/db/vec_db/faiss_impl/sqlite_init.sql +17 -0
- astrbot/core/db/vec_db/faiss_impl/vec_db.py +204 -0
- astrbot/core/event_bus.py +26 -22
- astrbot/core/exceptions.py +9 -0
- astrbot/core/file_token_service.py +98 -0
- astrbot/core/initial_loader.py +19 -10
- astrbot/core/knowledge_base/chunking/__init__.py +9 -0
- astrbot/core/knowledge_base/chunking/base.py +25 -0
- astrbot/core/knowledge_base/chunking/fixed_size.py +59 -0
- astrbot/core/knowledge_base/chunking/recursive.py +161 -0
- astrbot/core/knowledge_base/kb_db_sqlite.py +301 -0
- astrbot/core/knowledge_base/kb_helper.py +642 -0
- astrbot/core/knowledge_base/kb_mgr.py +330 -0
- astrbot/core/knowledge_base/models.py +120 -0
- astrbot/core/knowledge_base/parsers/__init__.py +13 -0
- astrbot/core/knowledge_base/parsers/base.py +51 -0
- astrbot/core/knowledge_base/parsers/markitdown_parser.py +26 -0
- astrbot/core/knowledge_base/parsers/pdf_parser.py +101 -0
- astrbot/core/knowledge_base/parsers/text_parser.py +42 -0
- astrbot/core/knowledge_base/parsers/url_parser.py +103 -0
- astrbot/core/knowledge_base/parsers/util.py +13 -0
- astrbot/core/knowledge_base/prompts.py +65 -0
- astrbot/core/knowledge_base/retrieval/__init__.py +14 -0
- astrbot/core/knowledge_base/retrieval/hit_stopwords.txt +767 -0
- astrbot/core/knowledge_base/retrieval/manager.py +276 -0
- astrbot/core/knowledge_base/retrieval/rank_fusion.py +142 -0
- astrbot/core/knowledge_base/retrieval/sparse_retriever.py +136 -0
- astrbot/core/log.py +21 -15
- astrbot/core/message/components.py +413 -287
- astrbot/core/message/message_event_result.py +35 -24
- astrbot/core/persona_mgr.py +192 -0
- astrbot/core/pipeline/__init__.py +14 -14
- astrbot/core/pipeline/content_safety_check/stage.py +13 -9
- astrbot/core/pipeline/content_safety_check/strategies/__init__.py +1 -2
- astrbot/core/pipeline/content_safety_check/strategies/baidu_aip.py +13 -14
- astrbot/core/pipeline/content_safety_check/strategies/keywords.py +2 -1
- astrbot/core/pipeline/content_safety_check/strategies/strategy.py +6 -6
- astrbot/core/pipeline/context.py +7 -1
- astrbot/core/pipeline/context_utils.py +107 -0
- astrbot/core/pipeline/preprocess_stage/stage.py +63 -36
- astrbot/core/pipeline/process_stage/method/agent_request.py +48 -0
- astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py +464 -0
- astrbot/core/pipeline/process_stage/method/agent_sub_stages/third_party.py +202 -0
- astrbot/core/pipeline/process_stage/method/star_request.py +26 -32
- astrbot/core/pipeline/process_stage/stage.py +21 -15
- astrbot/core/pipeline/process_stage/utils.py +125 -0
- astrbot/core/pipeline/rate_limit_check/stage.py +34 -36
- astrbot/core/pipeline/respond/stage.py +142 -101
- astrbot/core/pipeline/result_decorate/stage.py +124 -57
- astrbot/core/pipeline/scheduler.py +21 -16
- astrbot/core/pipeline/session_status_check/stage.py +37 -0
- astrbot/core/pipeline/stage.py +11 -76
- astrbot/core/pipeline/waking_check/stage.py +69 -33
- astrbot/core/pipeline/whitelist_check/stage.py +10 -7
- astrbot/core/platform/__init__.py +6 -6
- astrbot/core/platform/astr_message_event.py +107 -129
- astrbot/core/platform/astrbot_message.py +32 -12
- astrbot/core/platform/manager.py +62 -18
- astrbot/core/platform/message_session.py +30 -0
- astrbot/core/platform/platform.py +16 -24
- astrbot/core/platform/platform_metadata.py +9 -4
- astrbot/core/platform/register.py +12 -7
- astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py +136 -60
- astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +126 -46
- astrbot/core/platform/sources/dingtalk/dingtalk_adapter.py +63 -31
- astrbot/core/platform/sources/dingtalk/dingtalk_event.py +30 -26
- astrbot/core/platform/sources/discord/client.py +129 -0
- astrbot/core/platform/sources/discord/components.py +139 -0
- astrbot/core/platform/sources/discord/discord_platform_adapter.py +473 -0
- astrbot/core/platform/sources/discord/discord_platform_event.py +313 -0
- astrbot/core/platform/sources/lark/lark_adapter.py +27 -18
- astrbot/core/platform/sources/lark/lark_event.py +39 -13
- astrbot/core/platform/sources/misskey/misskey_adapter.py +770 -0
- astrbot/core/platform/sources/misskey/misskey_api.py +964 -0
- astrbot/core/platform/sources/misskey/misskey_event.py +163 -0
- astrbot/core/platform/sources/misskey/misskey_utils.py +550 -0
- astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py +149 -33
- astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py +41 -26
- astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_adapter.py +36 -17
- astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_event.py +3 -1
- astrbot/core/platform/sources/qqofficial_webhook/qo_webhook_server.py +14 -8
- astrbot/core/platform/sources/satori/satori_adapter.py +792 -0
- astrbot/core/platform/sources/satori/satori_event.py +432 -0
- astrbot/core/platform/sources/slack/client.py +164 -0
- astrbot/core/platform/sources/slack/slack_adapter.py +416 -0
- astrbot/core/platform/sources/slack/slack_event.py +253 -0
- astrbot/core/platform/sources/telegram/tg_adapter.py +100 -43
- astrbot/core/platform/sources/telegram/tg_event.py +136 -36
- astrbot/core/platform/sources/webchat/webchat_adapter.py +72 -22
- astrbot/core/platform/sources/webchat/webchat_event.py +46 -22
- astrbot/core/platform/sources/webchat/webchat_queue_mgr.py +35 -0
- astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +926 -0
- astrbot/core/platform/sources/wechatpadpro/wechatpadpro_message_event.py +178 -0
- astrbot/core/platform/sources/wechatpadpro/xml_data_parser.py +159 -0
- astrbot/core/platform/sources/wecom/wecom_adapter.py +169 -27
- astrbot/core/platform/sources/wecom/wecom_event.py +162 -77
- astrbot/core/platform/sources/wecom/wecom_kf.py +279 -0
- astrbot/core/platform/sources/wecom/wecom_kf_message.py +196 -0
- astrbot/core/platform/sources/wecom_ai_bot/WXBizJsonMsgCrypt.py +297 -0
- astrbot/core/platform/sources/wecom_ai_bot/__init__.py +15 -0
- astrbot/core/platform/sources/wecom_ai_bot/ierror.py +19 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_adapter.py +472 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_api.py +417 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_event.py +152 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_queue_mgr.py +153 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_server.py +168 -0
- astrbot/core/platform/sources/wecom_ai_bot/wecomai_utils.py +209 -0
- astrbot/core/platform/sources/weixin_official_account/weixin_offacc_adapter.py +306 -0
- astrbot/core/platform/sources/weixin_official_account/weixin_offacc_event.py +186 -0
- astrbot/core/platform_message_history_mgr.py +49 -0
- astrbot/core/provider/__init__.py +2 -3
- astrbot/core/provider/entites.py +8 -8
- astrbot/core/provider/entities.py +154 -98
- astrbot/core/provider/func_tool_manager.py +446 -458
- astrbot/core/provider/manager.py +345 -207
- astrbot/core/provider/provider.py +188 -73
- astrbot/core/provider/register.py +9 -7
- astrbot/core/provider/sources/anthropic_source.py +295 -115
- astrbot/core/provider/sources/azure_tts_source.py +224 -0
- astrbot/core/provider/sources/bailian_rerank_source.py +236 -0
- astrbot/core/provider/sources/dashscope_tts.py +138 -14
- astrbot/core/provider/sources/edge_tts_source.py +24 -19
- astrbot/core/provider/sources/fishaudio_tts_api_source.py +58 -13
- astrbot/core/provider/sources/gemini_embedding_source.py +61 -0
- astrbot/core/provider/sources/gemini_source.py +310 -132
- astrbot/core/provider/sources/gemini_tts_source.py +81 -0
- astrbot/core/provider/sources/groq_source.py +15 -0
- astrbot/core/provider/sources/gsv_selfhosted_source.py +151 -0
- astrbot/core/provider/sources/gsvi_tts_source.py +14 -7
- astrbot/core/provider/sources/minimax_tts_api_source.py +159 -0
- astrbot/core/provider/sources/openai_embedding_source.py +40 -0
- astrbot/core/provider/sources/openai_source.py +241 -145
- astrbot/core/provider/sources/openai_tts_api_source.py +18 -7
- astrbot/core/provider/sources/sensevoice_selfhosted_source.py +13 -11
- astrbot/core/provider/sources/vllm_rerank_source.py +71 -0
- astrbot/core/provider/sources/volcengine_tts.py +115 -0
- astrbot/core/provider/sources/whisper_api_source.py +18 -13
- astrbot/core/provider/sources/whisper_selfhosted_source.py +19 -12
- astrbot/core/provider/sources/xinference_rerank_source.py +116 -0
- astrbot/core/provider/sources/xinference_stt_provider.py +197 -0
- astrbot/core/provider/sources/zhipu_source.py +6 -73
- astrbot/core/star/__init__.py +43 -11
- astrbot/core/star/config.py +17 -18
- astrbot/core/star/context.py +362 -138
- astrbot/core/star/filter/__init__.py +4 -3
- astrbot/core/star/filter/command.py +111 -35
- astrbot/core/star/filter/command_group.py +46 -34
- astrbot/core/star/filter/custom_filter.py +6 -5
- astrbot/core/star/filter/event_message_type.py +4 -2
- astrbot/core/star/filter/permission.py +4 -2
- astrbot/core/star/filter/platform_adapter_type.py +45 -12
- astrbot/core/star/filter/regex.py +4 -2
- astrbot/core/star/register/__init__.py +19 -15
- astrbot/core/star/register/star.py +41 -13
- astrbot/core/star/register/star_handler.py +236 -86
- astrbot/core/star/session_llm_manager.py +280 -0
- astrbot/core/star/session_plugin_manager.py +170 -0
- astrbot/core/star/star.py +36 -43
- astrbot/core/star/star_handler.py +47 -85
- astrbot/core/star/star_manager.py +442 -260
- astrbot/core/star/star_tools.py +167 -45
- astrbot/core/star/updator.py +17 -20
- astrbot/core/umop_config_router.py +106 -0
- astrbot/core/updator.py +38 -13
- astrbot/core/utils/astrbot_path.py +39 -0
- astrbot/core/utils/command_parser.py +1 -1
- astrbot/core/utils/io.py +119 -60
- astrbot/core/utils/log_pipe.py +1 -1
- astrbot/core/utils/metrics.py +11 -10
- astrbot/core/utils/migra_helper.py +73 -0
- astrbot/core/utils/path_util.py +63 -62
- astrbot/core/utils/pip_installer.py +37 -15
- astrbot/core/utils/session_lock.py +29 -0
- astrbot/core/utils/session_waiter.py +19 -20
- astrbot/core/utils/shared_preferences.py +174 -34
- astrbot/core/utils/t2i/__init__.py +4 -1
- astrbot/core/utils/t2i/local_strategy.py +386 -238
- astrbot/core/utils/t2i/network_strategy.py +109 -49
- astrbot/core/utils/t2i/renderer.py +29 -14
- astrbot/core/utils/t2i/template/astrbot_powershell.html +184 -0
- astrbot/core/utils/t2i/template_manager.py +111 -0
- astrbot/core/utils/tencent_record_helper.py +115 -1
- astrbot/core/utils/version_comparator.py +10 -13
- astrbot/core/zip_updator.py +112 -65
- astrbot/dashboard/routes/__init__.py +20 -13
- astrbot/dashboard/routes/auth.py +20 -9
- astrbot/dashboard/routes/chat.py +297 -141
- astrbot/dashboard/routes/config.py +652 -55
- astrbot/dashboard/routes/conversation.py +107 -37
- astrbot/dashboard/routes/file.py +26 -0
- astrbot/dashboard/routes/knowledge_base.py +1244 -0
- astrbot/dashboard/routes/log.py +27 -2
- astrbot/dashboard/routes/persona.py +202 -0
- astrbot/dashboard/routes/plugin.py +197 -139
- astrbot/dashboard/routes/route.py +27 -7
- astrbot/dashboard/routes/session_management.py +354 -0
- astrbot/dashboard/routes/stat.py +85 -18
- astrbot/dashboard/routes/static_file.py +5 -2
- astrbot/dashboard/routes/t2i.py +233 -0
- astrbot/dashboard/routes/tools.py +184 -120
- astrbot/dashboard/routes/update.py +59 -36
- astrbot/dashboard/server.py +96 -36
- astrbot/dashboard/utils.py +165 -0
- astrbot-4.7.0.dist-info/METADATA +294 -0
- astrbot-4.7.0.dist-info/RECORD +274 -0
- {astrbot-3.5.6.dist-info → astrbot-4.7.0.dist-info}/WHEEL +1 -1
- astrbot/core/db/plugin/sqlite_impl.py +0 -112
- astrbot/core/db/sqlite_init.sql +0 -50
- astrbot/core/pipeline/platform_compatibility/stage.py +0 -56
- astrbot/core/pipeline/process_stage/method/llm_request.py +0 -606
- astrbot/core/platform/sources/gewechat/client.py +0 -806
- astrbot/core/platform/sources/gewechat/downloader.py +0 -55
- astrbot/core/platform/sources/gewechat/gewechat_event.py +0 -255
- astrbot/core/platform/sources/gewechat/gewechat_platform_adapter.py +0 -103
- astrbot/core/platform/sources/gewechat/xml_data_parser.py +0 -110
- astrbot/core/provider/sources/dashscope_source.py +0 -203
- astrbot/core/provider/sources/dify_source.py +0 -281
- astrbot/core/provider/sources/llmtuner_source.py +0 -132
- astrbot/core/rag/embedding/openai_source.py +0 -20
- astrbot/core/rag/knowledge_db_mgr.py +0 -94
- astrbot/core/rag/store/__init__.py +0 -9
- astrbot/core/rag/store/chroma_db.py +0 -42
- astrbot/core/utils/dify_api_client.py +0 -152
- astrbot-3.5.6.dist-info/METADATA +0 -249
- astrbot-3.5.6.dist-info/RECORD +0 -158
- {astrbot-3.5.6.dist-info → astrbot-4.7.0.dist-info}/entry_points.txt +0 -0
- {astrbot-3.5.6.dist-info → astrbot-4.7.0.dist-info}/licenses/LICENSE +0 -0
astrbot/core/config/default.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
"""
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"""如需修改配置,请在 `data/cmd_config.json` 中修改或者在管理面板中可视化修改。"""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
from astrbot.core.utils.astrbot_path import get_astrbot_data_path
|
|
4
6
|
|
|
5
|
-
VERSION = "
|
|
6
|
-
DB_PATH = "
|
|
7
|
+
VERSION = "4.7.0"
|
|
8
|
+
DB_PATH = os.path.join(get_astrbot_data_path(), "data_v4.db")
|
|
7
9
|
|
|
8
10
|
# 默认配置
|
|
9
11
|
DEFAULT_CONFIG = {
|
|
@@ -37,23 +39,42 @@ DEFAULT_CONFIG = {
|
|
|
37
39
|
},
|
|
38
40
|
"no_permission_reply": True,
|
|
39
41
|
"empty_mention_waiting": True,
|
|
42
|
+
"empty_mention_waiting_need_reply": True,
|
|
40
43
|
"friend_message_needs_wake_prefix": False,
|
|
41
44
|
"ignore_bot_self_message": False,
|
|
45
|
+
"ignore_at_all": False,
|
|
42
46
|
},
|
|
43
47
|
"provider": [],
|
|
44
48
|
"provider_settings": {
|
|
45
49
|
"enable": True,
|
|
50
|
+
"default_provider_id": "",
|
|
51
|
+
"default_image_caption_provider_id": "",
|
|
52
|
+
"image_caption_prompt": "Please describe the image using Chinese.",
|
|
53
|
+
"provider_pool": ["*"], # "*" 表示使用所有可用的提供者
|
|
46
54
|
"wake_prefix": "",
|
|
47
55
|
"web_search": False,
|
|
56
|
+
"websearch_provider": "default",
|
|
57
|
+
"websearch_tavily_key": [],
|
|
58
|
+
"websearch_baidu_app_builder_key": "",
|
|
48
59
|
"web_search_link": False,
|
|
60
|
+
"display_reasoning_text": False,
|
|
49
61
|
"identifier": False,
|
|
62
|
+
"group_name_display": False,
|
|
50
63
|
"datetime_system_prompt": True,
|
|
51
64
|
"default_personality": "default",
|
|
52
|
-
"
|
|
65
|
+
"persona_pool": ["*"],
|
|
66
|
+
"prompt_prefix": "{{prompt}}",
|
|
53
67
|
"max_context_length": -1,
|
|
54
68
|
"dequeue_context_length": 1,
|
|
55
69
|
"streaming_response": False,
|
|
56
|
-
"
|
|
70
|
+
"show_tool_use_status": False,
|
|
71
|
+
"agent_runner_type": "local",
|
|
72
|
+
"dify_agent_runner_provider_id": "",
|
|
73
|
+
"coze_agent_runner_provider_id": "",
|
|
74
|
+
"dashscope_agent_runner_provider_id": "",
|
|
75
|
+
"unsupported_streaming_strategy": "realtime_segmenting",
|
|
76
|
+
"max_agent_step": 30,
|
|
77
|
+
"tool_call_timeout": 60,
|
|
57
78
|
},
|
|
58
79
|
"provider_stt_settings": {
|
|
59
80
|
"enable": False,
|
|
@@ -63,18 +84,16 @@ DEFAULT_CONFIG = {
|
|
|
63
84
|
"enable": False,
|
|
64
85
|
"provider_id": "",
|
|
65
86
|
"dual_output": False,
|
|
87
|
+
"use_file_service": False,
|
|
66
88
|
},
|
|
67
89
|
"provider_ltm_settings": {
|
|
68
90
|
"group_icl_enable": False,
|
|
69
91
|
"group_message_max_cnt": 300,
|
|
70
92
|
"image_caption": False,
|
|
71
|
-
"image_caption_provider_id": "",
|
|
72
|
-
"image_caption_prompt": "Please describe the image using Chinese.",
|
|
73
93
|
"active_reply": {
|
|
74
94
|
"enable": False,
|
|
75
95
|
"method": "possibility_reply",
|
|
76
96
|
"possibility_reply": 0.1,
|
|
77
|
-
"prompt": "",
|
|
78
97
|
"whitelist": [],
|
|
79
98
|
},
|
|
80
99
|
},
|
|
@@ -88,35 +107,62 @@ DEFAULT_CONFIG = {
|
|
|
88
107
|
"t2i_word_threshold": 150,
|
|
89
108
|
"t2i_strategy": "remote",
|
|
90
109
|
"t2i_endpoint": "",
|
|
110
|
+
"t2i_use_file_service": False,
|
|
111
|
+
"t2i_active_template": "base",
|
|
91
112
|
"http_proxy": "",
|
|
113
|
+
"no_proxy": ["localhost", "127.0.0.1", "::1"],
|
|
92
114
|
"dashboard": {
|
|
93
115
|
"enable": True,
|
|
94
116
|
"username": "astrbot",
|
|
95
117
|
"password": "77b90590a8945a7d36c963981a307dc9",
|
|
118
|
+
"jwt_secret": "",
|
|
96
119
|
"host": "0.0.0.0",
|
|
97
120
|
"port": 6185,
|
|
98
121
|
},
|
|
99
122
|
"platform": [],
|
|
123
|
+
"platform_specific": {
|
|
124
|
+
# 平台特异配置:按平台分类,平台下按功能分组
|
|
125
|
+
"lark": {
|
|
126
|
+
"pre_ack_emoji": {"enable": False, "emojis": ["Typing"]},
|
|
127
|
+
},
|
|
128
|
+
"telegram": {
|
|
129
|
+
"pre_ack_emoji": {"enable": False, "emojis": ["✍️"]},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
100
132
|
"wake_prefix": ["/"],
|
|
101
133
|
"log_level": "INFO",
|
|
102
134
|
"pip_install_arg": "",
|
|
103
135
|
"pypi_index_url": "https://mirrors.aliyun.com/pypi/simple/",
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
136
|
+
"persona": [], # deprecated
|
|
137
|
+
"timezone": "Asia/Shanghai",
|
|
138
|
+
"callback_api_base": "",
|
|
139
|
+
"default_kb_collection": "", # 默认知识库名称, 已经过时
|
|
140
|
+
"plugin_set": ["*"], # "*" 表示使用所有可用的插件, 空列表表示不使用任何插件
|
|
141
|
+
"kb_names": [], # 默认知识库名称列表
|
|
142
|
+
"kb_fusion_top_k": 20, # 知识库检索融合阶段返回结果数量
|
|
143
|
+
"kb_final_top_k": 5, # 知识库检索最终返回结果数量
|
|
144
|
+
"kb_agentic_mode": False,
|
|
107
145
|
}
|
|
108
146
|
|
|
109
147
|
|
|
110
|
-
|
|
148
|
+
"""
|
|
149
|
+
AstrBot v3 时代的配置元数据,目前仅承担以下功能:
|
|
150
|
+
|
|
151
|
+
1. 保存配置时,配置项的类型验证
|
|
152
|
+
2. WebUI 展示提供商和平台适配器模版
|
|
153
|
+
|
|
154
|
+
WebUI 的配置文件在 `CONFIG_METADATA_3` 中。
|
|
155
|
+
|
|
156
|
+
未来将会逐步淘汰此配置元数据。
|
|
157
|
+
"""
|
|
111
158
|
CONFIG_METADATA_2 = {
|
|
112
159
|
"platform_group": {
|
|
113
|
-
"name": "消息平台",
|
|
114
160
|
"metadata": {
|
|
115
161
|
"platform": {
|
|
116
162
|
"description": "消息平台适配器",
|
|
117
163
|
"type": "list",
|
|
118
164
|
"config_template": {
|
|
119
|
-
"
|
|
165
|
+
"QQ 官方机器人(WebSocket)": {
|
|
120
166
|
"id": "default",
|
|
121
167
|
"type": "qq_official",
|
|
122
168
|
"enable": False,
|
|
@@ -125,16 +171,17 @@ CONFIG_METADATA_2 = {
|
|
|
125
171
|
"enable_group_c2c": True,
|
|
126
172
|
"enable_guild_direct_message": True,
|
|
127
173
|
},
|
|
128
|
-
"
|
|
174
|
+
"QQ 官方机器人(Webhook)": {
|
|
129
175
|
"id": "default",
|
|
130
176
|
"type": "qq_official_webhook",
|
|
131
177
|
"enable": False,
|
|
132
178
|
"appid": "",
|
|
133
179
|
"secret": "",
|
|
180
|
+
"is_sandbox": False,
|
|
134
181
|
"callback_server_host": "0.0.0.0",
|
|
135
182
|
"port": 6196,
|
|
136
183
|
},
|
|
137
|
-
"
|
|
184
|
+
"QQ 个人号(OneBot v11)": {
|
|
138
185
|
"id": "default",
|
|
139
186
|
"type": "aiocqhttp",
|
|
140
187
|
"enable": False,
|
|
@@ -142,16 +189,30 @@ CONFIG_METADATA_2 = {
|
|
|
142
189
|
"ws_reverse_port": 6199,
|
|
143
190
|
"ws_reverse_token": "",
|
|
144
191
|
},
|
|
145
|
-
"
|
|
146
|
-
"id": "
|
|
147
|
-
"type": "
|
|
192
|
+
"WeChatPadPro": {
|
|
193
|
+
"id": "wechatpadpro",
|
|
194
|
+
"type": "wechatpadpro",
|
|
148
195
|
"enable": False,
|
|
149
|
-
"
|
|
150
|
-
"nickname": "soulter",
|
|
196
|
+
"admin_key": "stay33",
|
|
151
197
|
"host": "这里填写你的局域网IP或者公网服务器IP",
|
|
152
|
-
"port":
|
|
198
|
+
"port": 8059,
|
|
199
|
+
"wpp_active_message_poll": False,
|
|
200
|
+
"wpp_active_message_poll_interval": 3,
|
|
201
|
+
},
|
|
202
|
+
"微信公众平台": {
|
|
203
|
+
"id": "weixin_official_account",
|
|
204
|
+
"type": "weixin_official_account",
|
|
205
|
+
"enable": False,
|
|
206
|
+
"appid": "",
|
|
207
|
+
"secret": "",
|
|
208
|
+
"token": "",
|
|
209
|
+
"encoding_aes_key": "",
|
|
210
|
+
"api_base_url": "https://api.weixin.qq.com/cgi-bin/",
|
|
211
|
+
"callback_server_host": "0.0.0.0",
|
|
212
|
+
"port": 6194,
|
|
213
|
+
"active_send_mode": False,
|
|
153
214
|
},
|
|
154
|
-
"
|
|
215
|
+
"企业微信(含微信客服)": {
|
|
155
216
|
"id": "wecom",
|
|
156
217
|
"type": "wecom",
|
|
157
218
|
"enable": False,
|
|
@@ -159,11 +220,24 @@ CONFIG_METADATA_2 = {
|
|
|
159
220
|
"secret": "",
|
|
160
221
|
"token": "",
|
|
161
222
|
"encoding_aes_key": "",
|
|
223
|
+
"kf_name": "",
|
|
162
224
|
"api_base_url": "https://qyapi.weixin.qq.com/cgi-bin/",
|
|
163
225
|
"callback_server_host": "0.0.0.0",
|
|
164
226
|
"port": 6195,
|
|
165
227
|
},
|
|
166
|
-
"
|
|
228
|
+
"企业微信智能机器人": {
|
|
229
|
+
"id": "wecom_ai_bot",
|
|
230
|
+
"type": "wecom_ai_bot",
|
|
231
|
+
"enable": True,
|
|
232
|
+
"wecomaibot_init_respond_text": "💭 思考中...",
|
|
233
|
+
"wecomaibot_friend_message_welcome_text": "",
|
|
234
|
+
"wecom_ai_bot_name": "",
|
|
235
|
+
"token": "",
|
|
236
|
+
"encoding_aes_key": "",
|
|
237
|
+
"callback_server_host": "0.0.0.0",
|
|
238
|
+
"port": 6198,
|
|
239
|
+
},
|
|
240
|
+
"飞书(Lark)": {
|
|
167
241
|
"id": "lark",
|
|
168
242
|
"type": "lark",
|
|
169
243
|
"enable": False,
|
|
@@ -172,14 +246,14 @@ CONFIG_METADATA_2 = {
|
|
|
172
246
|
"app_secret": "",
|
|
173
247
|
"domain": "https://open.feishu.cn",
|
|
174
248
|
},
|
|
175
|
-
"
|
|
249
|
+
"钉钉(DingTalk)": {
|
|
176
250
|
"id": "dingtalk",
|
|
177
251
|
"type": "dingtalk",
|
|
178
252
|
"enable": False,
|
|
179
253
|
"client_id": "",
|
|
180
254
|
"client_secret": "",
|
|
181
255
|
},
|
|
182
|
-
"
|
|
256
|
+
"Telegram": {
|
|
183
257
|
"id": "telegram",
|
|
184
258
|
"type": "telegram",
|
|
185
259
|
"enable": False,
|
|
@@ -191,13 +265,218 @@ CONFIG_METADATA_2 = {
|
|
|
191
265
|
"telegram_command_auto_refresh": True,
|
|
192
266
|
"telegram_command_register_interval": 300,
|
|
193
267
|
},
|
|
268
|
+
"Discord": {
|
|
269
|
+
"id": "discord",
|
|
270
|
+
"type": "discord",
|
|
271
|
+
"enable": False,
|
|
272
|
+
"discord_token": "",
|
|
273
|
+
"discord_proxy": "",
|
|
274
|
+
"discord_command_register": True,
|
|
275
|
+
"discord_guild_id_for_debug": "",
|
|
276
|
+
"discord_activity_name": "",
|
|
277
|
+
},
|
|
278
|
+
"Misskey": {
|
|
279
|
+
"id": "misskey",
|
|
280
|
+
"type": "misskey",
|
|
281
|
+
"enable": False,
|
|
282
|
+
"misskey_instance_url": "https://misskey.example",
|
|
283
|
+
"misskey_token": "",
|
|
284
|
+
"misskey_default_visibility": "public",
|
|
285
|
+
"misskey_local_only": False,
|
|
286
|
+
"misskey_enable_chat": True,
|
|
287
|
+
# download / security options
|
|
288
|
+
"misskey_allow_insecure_downloads": False,
|
|
289
|
+
"misskey_download_timeout": 15,
|
|
290
|
+
"misskey_download_chunk_size": 65536,
|
|
291
|
+
"misskey_max_download_bytes": None,
|
|
292
|
+
"misskey_enable_file_upload": True,
|
|
293
|
+
"misskey_upload_concurrency": 3,
|
|
294
|
+
"misskey_upload_folder": "",
|
|
295
|
+
},
|
|
296
|
+
"Slack": {
|
|
297
|
+
"id": "slack",
|
|
298
|
+
"type": "slack",
|
|
299
|
+
"enable": False,
|
|
300
|
+
"bot_token": "",
|
|
301
|
+
"app_token": "",
|
|
302
|
+
"signing_secret": "",
|
|
303
|
+
"slack_connection_mode": "socket", # webhook, socket
|
|
304
|
+
"slack_webhook_host": "0.0.0.0",
|
|
305
|
+
"slack_webhook_port": 6197,
|
|
306
|
+
"slack_webhook_path": "/astrbot-slack-webhook/callback",
|
|
307
|
+
},
|
|
308
|
+
"Satori": {
|
|
309
|
+
"id": "satori",
|
|
310
|
+
"type": "satori",
|
|
311
|
+
"enable": False,
|
|
312
|
+
"satori_api_base_url": "http://localhost:5140/satori/v1",
|
|
313
|
+
"satori_endpoint": "ws://localhost:5140/satori/v1/events",
|
|
314
|
+
"satori_token": "",
|
|
315
|
+
"satori_auto_reconnect": True,
|
|
316
|
+
"satori_heartbeat_interval": 10,
|
|
317
|
+
"satori_reconnect_delay": 5,
|
|
318
|
+
},
|
|
319
|
+
# "WebChat": {
|
|
320
|
+
# "id": "webchat",
|
|
321
|
+
# "type": "webchat",
|
|
322
|
+
# "enable": False,
|
|
323
|
+
# "webchat_link_path": "",
|
|
324
|
+
# "webchat_present_type": "fullscreen",
|
|
325
|
+
# },
|
|
194
326
|
},
|
|
195
327
|
"items": {
|
|
328
|
+
# "webchat_link_path": {
|
|
329
|
+
# "description": "链接路径",
|
|
330
|
+
# "_special": "webchat_link_path",
|
|
331
|
+
# "type": "string",
|
|
332
|
+
# },
|
|
333
|
+
# "webchat_present_type": {
|
|
334
|
+
# "_special": "webchat_present_type",
|
|
335
|
+
# "description": "展现形式",
|
|
336
|
+
# "type": "string",
|
|
337
|
+
# "options": ["fullscreen", "embedded"],
|
|
338
|
+
# },
|
|
339
|
+
"is_sandbox": {
|
|
340
|
+
"description": "沙箱模式",
|
|
341
|
+
"type": "bool",
|
|
342
|
+
},
|
|
343
|
+
"satori_api_base_url": {
|
|
344
|
+
"description": "Satori API 终结点",
|
|
345
|
+
"type": "string",
|
|
346
|
+
"hint": "Satori API 的基础地址。",
|
|
347
|
+
},
|
|
348
|
+
"satori_endpoint": {
|
|
349
|
+
"description": "Satori WebSocket 终结点",
|
|
350
|
+
"type": "string",
|
|
351
|
+
"hint": "Satori 事件的 WebSocket 端点。",
|
|
352
|
+
},
|
|
353
|
+
"satori_token": {
|
|
354
|
+
"description": "Satori 令牌",
|
|
355
|
+
"type": "string",
|
|
356
|
+
"hint": "用于 Satori API 身份验证的令牌。",
|
|
357
|
+
},
|
|
358
|
+
"satori_auto_reconnect": {
|
|
359
|
+
"description": "启用自动重连",
|
|
360
|
+
"type": "bool",
|
|
361
|
+
"hint": "断开连接时是否自动重新连接 WebSocket。",
|
|
362
|
+
},
|
|
363
|
+
"satori_heartbeat_interval": {
|
|
364
|
+
"description": "Satori 心跳间隔",
|
|
365
|
+
"type": "int",
|
|
366
|
+
"hint": "发送心跳消息的间隔(秒)。",
|
|
367
|
+
},
|
|
368
|
+
"satori_reconnect_delay": {
|
|
369
|
+
"description": "Satori 重连延迟",
|
|
370
|
+
"type": "int",
|
|
371
|
+
"hint": "尝试重新连接前的延迟时间(秒)。",
|
|
372
|
+
},
|
|
373
|
+
"slack_connection_mode": {
|
|
374
|
+
"description": "Slack Connection Mode",
|
|
375
|
+
"type": "string",
|
|
376
|
+
"options": ["webhook", "socket"],
|
|
377
|
+
"hint": "The connection mode for Slack. `webhook` uses a webhook server, `socket` uses Slack's Socket Mode.",
|
|
378
|
+
},
|
|
379
|
+
"slack_webhook_host": {
|
|
380
|
+
"description": "Slack Webhook Host",
|
|
381
|
+
"type": "string",
|
|
382
|
+
"hint": "Only valid when Slack connection mode is `webhook`.",
|
|
383
|
+
},
|
|
384
|
+
"slack_webhook_port": {
|
|
385
|
+
"description": "Slack Webhook Port",
|
|
386
|
+
"type": "int",
|
|
387
|
+
"hint": "Only valid when Slack connection mode is `webhook`.",
|
|
388
|
+
},
|
|
389
|
+
"slack_webhook_path": {
|
|
390
|
+
"description": "Slack Webhook Path",
|
|
391
|
+
"type": "string",
|
|
392
|
+
"hint": "Only valid when Slack connection mode is `webhook`.",
|
|
393
|
+
},
|
|
394
|
+
"active_send_mode": {
|
|
395
|
+
"description": "是否换用主动发送接口",
|
|
396
|
+
"type": "bool",
|
|
397
|
+
"desc": "只有企业认证的公众号才能主动发送。主动发送接口的限制会少一些。",
|
|
398
|
+
},
|
|
399
|
+
"wpp_active_message_poll": {
|
|
400
|
+
"description": "是否启用主动消息轮询",
|
|
401
|
+
"type": "bool",
|
|
402
|
+
"hint": "只有当你发现微信消息没有按时同步到 AstrBot 时,才需要启用这个功能,默认不启用。",
|
|
403
|
+
},
|
|
404
|
+
"wpp_active_message_poll_interval": {
|
|
405
|
+
"description": "主动消息轮询间隔",
|
|
406
|
+
"type": "int",
|
|
407
|
+
"hint": "主动消息轮询间隔,单位为秒,默认 3 秒,最大不要超过 60 秒,否则可能被认为是旧消息。",
|
|
408
|
+
},
|
|
409
|
+
"kf_name": {
|
|
410
|
+
"description": "微信客服账号名",
|
|
411
|
+
"type": "string",
|
|
412
|
+
"hint": "可选。微信客服账号名(不是 ID)。可在 https://kf.weixin.qq.com/kf/frame#/accounts 获取",
|
|
413
|
+
},
|
|
196
414
|
"telegram_token": {
|
|
197
415
|
"description": "Bot Token",
|
|
198
416
|
"type": "string",
|
|
199
417
|
"hint": "如果你的网络环境为中国大陆,请在 `其他配置` 处设置代理或更改 api_base。",
|
|
200
418
|
},
|
|
419
|
+
"misskey_instance_url": {
|
|
420
|
+
"description": "Misskey 实例 URL",
|
|
421
|
+
"type": "string",
|
|
422
|
+
"hint": "例如 https://misskey.example,填写 Bot 账号所在的 Misskey 实例地址",
|
|
423
|
+
},
|
|
424
|
+
"misskey_token": {
|
|
425
|
+
"description": "Misskey Access Token",
|
|
426
|
+
"type": "string",
|
|
427
|
+
"hint": "连接服务设置生成的 API 鉴权访问令牌(Access token)",
|
|
428
|
+
},
|
|
429
|
+
"misskey_default_visibility": {
|
|
430
|
+
"description": "默认帖子可见性",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"options": ["public", "home", "followers"],
|
|
433
|
+
"hint": "机器人发帖时的默认可见性设置。public:公开,home:主页时间线,followers:仅关注者。",
|
|
434
|
+
},
|
|
435
|
+
"misskey_local_only": {
|
|
436
|
+
"description": "仅限本站(不参与联合)",
|
|
437
|
+
"type": "bool",
|
|
438
|
+
"hint": "启用后,机器人发出的帖子将仅在本实例可见,不会联合到其他实例",
|
|
439
|
+
},
|
|
440
|
+
"misskey_enable_chat": {
|
|
441
|
+
"description": "启用聊天消息响应",
|
|
442
|
+
"type": "bool",
|
|
443
|
+
"hint": "启用后,机器人将会监听和响应私信聊天消息",
|
|
444
|
+
},
|
|
445
|
+
"misskey_enable_file_upload": {
|
|
446
|
+
"description": "启用文件上传到 Misskey",
|
|
447
|
+
"type": "bool",
|
|
448
|
+
"hint": "启用后,适配器会尝试将消息链中的文件上传到 Misskey。URL 文件会先尝试服务器端上传,异步上传失败时会回退到下载后本地上传。",
|
|
449
|
+
},
|
|
450
|
+
"misskey_allow_insecure_downloads": {
|
|
451
|
+
"description": "允许不安全下载(禁用 SSL 验证)",
|
|
452
|
+
"type": "bool",
|
|
453
|
+
"hint": "当远端服务器存在证书问题导致无法正常下载时,自动禁用 SSL 验证作为回退方案。适用于某些图床的证书配置问题。启用有安全风险,仅在必要时使用。",
|
|
454
|
+
},
|
|
455
|
+
"misskey_download_timeout": {
|
|
456
|
+
"description": "远端下载超时时间(秒)",
|
|
457
|
+
"type": "int",
|
|
458
|
+
"hint": "下载远程文件时的超时时间(秒),用于异步上传回退到本地上传的场景。",
|
|
459
|
+
},
|
|
460
|
+
"misskey_download_chunk_size": {
|
|
461
|
+
"description": "流式下载分块大小(字节)",
|
|
462
|
+
"type": "int",
|
|
463
|
+
"hint": "流式下载和计算 MD5 时使用的每次读取字节数,过小会增加开销,过大会占用内存。",
|
|
464
|
+
},
|
|
465
|
+
"misskey_max_download_bytes": {
|
|
466
|
+
"description": "最大允许下载字节数(超出则中止)",
|
|
467
|
+
"type": "int",
|
|
468
|
+
"hint": "如果希望限制下载文件的最大大小以防止 OOM,请填写最大字节数;留空或 null 表示不限制。",
|
|
469
|
+
},
|
|
470
|
+
"misskey_upload_concurrency": {
|
|
471
|
+
"description": "并发上传限制",
|
|
472
|
+
"type": "int",
|
|
473
|
+
"hint": "同时进行的文件上传任务上限(整数,默认 3)。",
|
|
474
|
+
},
|
|
475
|
+
"misskey_upload_folder": {
|
|
476
|
+
"description": "上传到网盘的目标文件夹 ID",
|
|
477
|
+
"type": "string",
|
|
478
|
+
"hint": "可选:填写 Misskey 网盘中目标文件夹的 ID,上传的文件将放置到该文件夹内。留空则使用账号网盘根目录。",
|
|
479
|
+
},
|
|
201
480
|
"telegram_command_register": {
|
|
202
481
|
"description": "Telegram 命令注册",
|
|
203
482
|
"type": "bool",
|
|
@@ -214,10 +493,9 @@ CONFIG_METADATA_2 = {
|
|
|
214
493
|
"hint": "Telegram 命令自动刷新间隔,单位为秒。",
|
|
215
494
|
},
|
|
216
495
|
"id": {
|
|
217
|
-
"description": "
|
|
496
|
+
"description": "机器人名称",
|
|
218
497
|
"type": "string",
|
|
219
|
-
"
|
|
220
|
-
"hint": "ID 不能和其它的平台适配器重复,否则将发生严重冲突。",
|
|
498
|
+
"hint": "机器人名称",
|
|
221
499
|
},
|
|
222
500
|
"type": {
|
|
223
501
|
"description": "适配器类型",
|
|
@@ -237,7 +515,7 @@ CONFIG_METADATA_2 = {
|
|
|
237
515
|
"secret": {
|
|
238
516
|
"description": "secret",
|
|
239
517
|
"type": "string",
|
|
240
|
-
"hint": "必填项。
|
|
518
|
+
"hint": "必填项。",
|
|
241
519
|
},
|
|
242
520
|
"enable_group_c2c": {
|
|
243
521
|
"description": "启用消息列表单聊",
|
|
@@ -250,211 +528,206 @@ CONFIG_METADATA_2 = {
|
|
|
250
528
|
"hint": "启用后,机器人可以接收到频道的私聊消息。",
|
|
251
529
|
},
|
|
252
530
|
"ws_reverse_host": {
|
|
253
|
-
"description": "反向 Websocket
|
|
531
|
+
"description": "反向 Websocket 主机",
|
|
254
532
|
"type": "string",
|
|
255
|
-
"hint": "
|
|
533
|
+
"hint": "AstrBot 将作为服务器端。",
|
|
256
534
|
},
|
|
257
535
|
"ws_reverse_port": {
|
|
258
536
|
"description": "反向 Websocket 端口",
|
|
259
537
|
"type": "int",
|
|
260
|
-
"hint": "aiocqhttp 适配器的反向 Websocket 端口。",
|
|
261
538
|
},
|
|
262
539
|
"ws_reverse_token": {
|
|
263
540
|
"description": "反向 Websocket Token",
|
|
264
541
|
"type": "string",
|
|
265
|
-
"hint": "
|
|
542
|
+
"hint": "反向 Websocket Token。未设置则不启用 Token 验证。",
|
|
543
|
+
},
|
|
544
|
+
"wecom_ai_bot_name": {
|
|
545
|
+
"description": "企业微信智能机器人的名字",
|
|
546
|
+
"type": "string",
|
|
547
|
+
"hint": "请务必填写正确,否则无法使用一些指令。",
|
|
548
|
+
},
|
|
549
|
+
"wecomaibot_init_respond_text": {
|
|
550
|
+
"description": "企业微信智能机器人初始响应文本",
|
|
551
|
+
"type": "string",
|
|
552
|
+
"hint": "当机器人收到消息时,首先回复的文本内容。留空则使用默认值。",
|
|
553
|
+
},
|
|
554
|
+
"wecomaibot_friend_message_welcome_text": {
|
|
555
|
+
"description": "企业微信智能机器人私聊欢迎语",
|
|
556
|
+
"type": "string",
|
|
557
|
+
"hint": "当用户当天进入智能机器人单聊会话,回复欢迎语,留空则不回复。",
|
|
266
558
|
},
|
|
267
559
|
"lark_bot_name": {
|
|
268
560
|
"description": "飞书机器人的名字",
|
|
269
561
|
"type": "string",
|
|
270
|
-
"hint": "
|
|
271
|
-
|
|
562
|
+
"hint": "请务必填写正确,否则 @ 机器人将无法唤醒,只能通过前缀唤醒。",
|
|
563
|
+
},
|
|
564
|
+
"discord_token": {
|
|
565
|
+
"description": "Discord Bot Token",
|
|
566
|
+
"type": "string",
|
|
567
|
+
"hint": "在此处填入你的Discord Bot Token",
|
|
568
|
+
},
|
|
569
|
+
"discord_proxy": {
|
|
570
|
+
"description": "Discord 代理地址",
|
|
571
|
+
"type": "string",
|
|
572
|
+
"hint": "可选的代理地址:http://ip:port",
|
|
573
|
+
},
|
|
574
|
+
"discord_command_register": {
|
|
575
|
+
"description": "是否自动将插件指令注册为 Discord 斜杠指令",
|
|
576
|
+
"type": "bool",
|
|
577
|
+
},
|
|
578
|
+
"discord_activity_name": {
|
|
579
|
+
"description": "Discord 活动名称",
|
|
580
|
+
"type": "string",
|
|
581
|
+
"hint": "可选的 Discord 活动名称。留空则不设置活动。",
|
|
272
582
|
},
|
|
273
583
|
},
|
|
274
584
|
},
|
|
275
585
|
"platform_settings": {
|
|
276
|
-
"description": "平台设置",
|
|
277
586
|
"type": "object",
|
|
278
587
|
"items": {
|
|
279
|
-
"plugin_enable": {
|
|
280
|
-
"invisible": True, # 隐藏插件启用配置
|
|
281
|
-
},
|
|
282
588
|
"unique_session": {
|
|
283
|
-
"description": "会话隔离",
|
|
284
589
|
"type": "bool",
|
|
285
|
-
"hint": "启用后,在群组或者频道中,每个人的消息上下文都是独立的。",
|
|
286
590
|
},
|
|
287
591
|
"rate_limit": {
|
|
288
|
-
"description": "速率限制",
|
|
289
|
-
"hint": "每个会话在 `time` 秒内最多只能发送 `count` 条消息。",
|
|
290
592
|
"type": "object",
|
|
291
593
|
"items": {
|
|
292
|
-
"time": {"
|
|
293
|
-
"count": {"
|
|
594
|
+
"time": {"type": "int"},
|
|
595
|
+
"count": {"type": "int"},
|
|
294
596
|
"strategy": {
|
|
295
|
-
"description": "速率限制策略",
|
|
296
597
|
"type": "string",
|
|
297
598
|
"options": ["stall", "discard"],
|
|
298
|
-
"hint": "当消息速率超过限制时的处理策略。stall 为等待,discard 为丢弃。",
|
|
299
599
|
},
|
|
300
600
|
},
|
|
301
601
|
},
|
|
302
602
|
"no_permission_reply": {
|
|
303
|
-
"description": "无权限回复",
|
|
304
603
|
"type": "bool",
|
|
305
604
|
"hint": "启用后,当用户没有权限执行某个操作时,机器人会回复一条消息。",
|
|
306
605
|
},
|
|
307
606
|
"empty_mention_waiting": {
|
|
308
|
-
"description": "只 @ 机器人是否触发等待回复",
|
|
309
607
|
"type": "bool",
|
|
310
|
-
"hint": "启用后,当消息内容只有 @
|
|
608
|
+
"hint": "启用后,当消息内容只有 @ 机器人时,会触发等待,在 60 秒内的该用户的任意一条消息均会唤醒机器人。这在某些平台不支持 @ 和语音/图片等消息同时发送时特别有用。",
|
|
609
|
+
},
|
|
610
|
+
"empty_mention_waiting_need_reply": {
|
|
611
|
+
"type": "bool",
|
|
612
|
+
"hint": "在上面一个配置项中,如果启用了触发等待,启用此项后,机器人会使用 LLM 生成一条回复。否则,将不回复而只是等待。",
|
|
311
613
|
},
|
|
312
614
|
"friend_message_needs_wake_prefix": {
|
|
313
|
-
"description": "私聊消息是否需要唤醒前缀",
|
|
314
615
|
"type": "bool",
|
|
315
616
|
"hint": "启用后,私聊消息需要唤醒前缀才会被处理,同群聊一样。",
|
|
316
617
|
},
|
|
317
618
|
"ignore_bot_self_message": {
|
|
318
|
-
"description": "是否忽略机器人自身的消息",
|
|
319
619
|
"type": "bool",
|
|
320
|
-
"hint": "
|
|
620
|
+
"hint": "某些平台会将自身账号在其他 APP 端发送的消息也当做消息事件下发导致给自己发消息时唤醒机器人",
|
|
621
|
+
},
|
|
622
|
+
"ignore_at_all": {
|
|
623
|
+
"type": "bool",
|
|
624
|
+
"hint": "启用后,机器人会忽略 @ 全体成员 的消息事件。",
|
|
321
625
|
},
|
|
322
626
|
"segmented_reply": {
|
|
323
|
-
"description": "分段回复",
|
|
324
627
|
"type": "object",
|
|
325
628
|
"items": {
|
|
326
629
|
"enable": {
|
|
327
|
-
"description": "启用分段回复",
|
|
328
630
|
"type": "bool",
|
|
329
631
|
},
|
|
330
632
|
"only_llm_result": {
|
|
331
|
-
"description": "仅对 LLM 结果分段",
|
|
332
633
|
"type": "bool",
|
|
333
634
|
},
|
|
334
635
|
"interval_method": {
|
|
335
|
-
"description": "间隔时间计算方法",
|
|
336
636
|
"type": "string",
|
|
337
637
|
"options": ["random", "log"],
|
|
338
638
|
"hint": "分段回复的间隔时间计算方法。random 为随机时间,log 为根据消息长度计算,$y=log_<log_base>(x)$,x为字数,y的单位为秒。",
|
|
339
639
|
},
|
|
340
640
|
"interval": {
|
|
341
|
-
"description": "随机间隔时间(秒)",
|
|
342
641
|
"type": "string",
|
|
343
642
|
"hint": "`random` 方法用。每一段回复的间隔时间,格式为 `最小时间,最大时间`。如 `0.75,2.5`",
|
|
344
643
|
},
|
|
345
644
|
"log_base": {
|
|
346
|
-
"description": "对数函数底数",
|
|
347
645
|
"type": "float",
|
|
348
646
|
"hint": "`log` 方法用。对数函数的底数。默认为 2.6",
|
|
349
647
|
},
|
|
350
648
|
"words_count_threshold": {
|
|
351
|
-
"description": "字数阈值",
|
|
352
649
|
"type": "int",
|
|
353
|
-
"hint": "
|
|
650
|
+
"hint": "分段回复的字数上限。只有字数小于此值的消息才会被分段,超过此值的长消息将直接发送(不分段)。默认为 150",
|
|
354
651
|
},
|
|
355
652
|
"regex": {
|
|
356
|
-
"description": "正则表达式",
|
|
357
653
|
"type": "string",
|
|
358
|
-
"obvious_hint": True,
|
|
359
654
|
"hint": "用于分隔一段消息。默认情况下会根据句号、问号等标点符号分隔。re.findall(r'<regex>', text)",
|
|
360
655
|
},
|
|
361
656
|
"content_cleanup_rule": {
|
|
362
|
-
"description": "过滤分段后的内容",
|
|
363
657
|
"type": "string",
|
|
364
|
-
"obvious_hint": True,
|
|
365
658
|
"hint": "移除分段后的内容中的指定的内容。支持正则表达式。如填写 `[。?!]` 将移除所有的句号、问号、感叹号。re.sub(r'<regex>', '', text)",
|
|
366
659
|
},
|
|
367
660
|
},
|
|
368
661
|
},
|
|
369
662
|
"reply_prefix": {
|
|
370
|
-
"description": "回复前缀",
|
|
371
663
|
"type": "string",
|
|
372
664
|
"hint": "机器人回复消息时带有的前缀。",
|
|
373
665
|
},
|
|
374
666
|
"forward_threshold": {
|
|
375
|
-
"description": "转发消息的字数阈值",
|
|
376
667
|
"type": "int",
|
|
377
668
|
"hint": "超过一定字数后,机器人会将消息折叠成 QQ 群聊的 “转发消息”,以防止刷屏。目前仅 QQ 平台适配器适用。",
|
|
378
669
|
},
|
|
379
670
|
"enable_id_white_list": {
|
|
380
|
-
"description": "启用 ID 白名单",
|
|
381
671
|
"type": "bool",
|
|
382
672
|
},
|
|
383
673
|
"id_whitelist": {
|
|
384
|
-
"description": "ID 白名单",
|
|
385
674
|
"type": "list",
|
|
386
675
|
"items": {"type": "string"},
|
|
387
|
-
"obvious_hint": True,
|
|
388
676
|
"hint": "只处理填写的 ID 发来的消息事件,为空时不启用。可使用 /sid 指令获取在平台上的会话 ID(类似 abc:GroupMessage:123)。管理员可使用 /wl 添加白名单",
|
|
389
677
|
},
|
|
390
678
|
"id_whitelist_log": {
|
|
391
|
-
"description": "打印白名单日志",
|
|
392
679
|
"type": "bool",
|
|
393
680
|
"hint": "启用后,当一条消息没通过白名单时,会输出 INFO 级别的日志。",
|
|
394
681
|
},
|
|
395
682
|
"wl_ignore_admin_on_group": {
|
|
396
|
-
"description": "管理员群组消息无视 ID 白名单",
|
|
397
683
|
"type": "bool",
|
|
398
684
|
},
|
|
399
685
|
"wl_ignore_admin_on_friend": {
|
|
400
|
-
"description": "管理员私聊消息无视 ID 白名单",
|
|
401
686
|
"type": "bool",
|
|
402
687
|
},
|
|
403
688
|
"reply_with_mention": {
|
|
404
|
-
"description": "回复时 @ 发送者",
|
|
405
689
|
"type": "bool",
|
|
406
690
|
"hint": "启用后,机器人回复消息时会 @ 发送者。实际效果以具体的平台适配器为准。",
|
|
407
691
|
},
|
|
408
692
|
"reply_with_quote": {
|
|
409
|
-
"description": "回复时引用消息",
|
|
410
693
|
"type": "bool",
|
|
411
694
|
"hint": "启用后,机器人回复消息时会引用原消息。实际效果以具体的平台适配器为准。",
|
|
412
695
|
},
|
|
413
696
|
"path_mapping": {
|
|
414
|
-
"description": "路径映射",
|
|
415
697
|
"type": "list",
|
|
416
698
|
"items": {"type": "string"},
|
|
417
|
-
"obvious_hint": True,
|
|
418
699
|
"hint": "此功能解决由于文件系统不一致导致路径不存在的问题。格式为 <原路径>:<映射路径>。如 `/app/.config/QQ:/var/lib/docker/volumes/xxxx/_data`。这样,当消息平台下发的事件中图片和语音路径以 `/app/.config/QQ` 开头时,开头被替换为 `/var/lib/docker/volumes/xxxx/_data`。这在 AstrBot 或者平台协议端使用 Docker 部署时特别有用。",
|
|
419
700
|
},
|
|
420
701
|
},
|
|
421
702
|
},
|
|
422
703
|
"content_safety": {
|
|
423
|
-
"description": "内容安全",
|
|
424
704
|
"type": "object",
|
|
425
705
|
"items": {
|
|
426
706
|
"also_use_in_response": {
|
|
427
|
-
"description": "对大模型响应安全审核",
|
|
428
707
|
"type": "bool",
|
|
429
708
|
"hint": "启用后,大模型的响应也会通过内容安全审核。",
|
|
430
709
|
},
|
|
431
710
|
"baidu_aip": {
|
|
432
|
-
"description": "百度内容审核配置",
|
|
433
711
|
"type": "object",
|
|
434
712
|
"items": {
|
|
435
713
|
"enable": {
|
|
436
|
-
"description": "启用百度内容审核",
|
|
437
714
|
"type": "bool",
|
|
438
715
|
"hint": "启用此功能前,您需要手动在设备中安装 baidu-aip 库。一般来说,安装指令如下: `pip3 install baidu-aip`",
|
|
439
716
|
},
|
|
440
717
|
"app_id": {"description": "APP ID", "type": "string"},
|
|
441
718
|
"api_key": {"description": "API Key", "type": "string"},
|
|
442
719
|
"secret_key": {
|
|
443
|
-
"description": "Secret Key",
|
|
444
720
|
"type": "string",
|
|
445
721
|
},
|
|
446
722
|
},
|
|
447
723
|
},
|
|
448
724
|
"internal_keywords": {
|
|
449
|
-
"description": "内部关键词过滤",
|
|
450
725
|
"type": "object",
|
|
451
726
|
"items": {
|
|
452
727
|
"enable": {
|
|
453
|
-
"description": "启用内部关键词过滤",
|
|
454
728
|
"type": "bool",
|
|
455
729
|
},
|
|
456
730
|
"extra_keywords": {
|
|
457
|
-
"description": "额外关键词",
|
|
458
731
|
"type": "list",
|
|
459
732
|
"items": {"type": "string"},
|
|
460
733
|
"hint": "额外的屏蔽关键词列表,支持正则表达式。",
|
|
@@ -469,46 +742,59 @@ CONFIG_METADATA_2 = {
|
|
|
469
742
|
"name": "服务提供商",
|
|
470
743
|
"metadata": {
|
|
471
744
|
"provider": {
|
|
472
|
-
"description": "服务提供商配置",
|
|
473
745
|
"type": "list",
|
|
474
746
|
"config_template": {
|
|
475
747
|
"OpenAI": {
|
|
476
748
|
"id": "openai",
|
|
749
|
+
"provider": "openai",
|
|
477
750
|
"type": "openai_chat_completion",
|
|
751
|
+
"provider_type": "chat_completion",
|
|
478
752
|
"enable": True,
|
|
479
753
|
"key": [],
|
|
480
754
|
"api_base": "https://api.openai.com/v1",
|
|
481
755
|
"timeout": 120,
|
|
482
|
-
"model_config": {
|
|
483
|
-
|
|
484
|
-
},
|
|
756
|
+
"model_config": {"model": "gpt-4o-mini", "temperature": 0.4},
|
|
757
|
+
"custom_headers": {},
|
|
758
|
+
"custom_extra_body": {},
|
|
759
|
+
"modalities": ["text", "image", "tool_use"],
|
|
760
|
+
"hint": "也兼容所有与 OpenAI API 兼容的服务。",
|
|
485
761
|
},
|
|
486
|
-
"
|
|
762
|
+
"Azure OpenAI": {
|
|
487
763
|
"id": "azure",
|
|
764
|
+
"provider": "azure",
|
|
488
765
|
"type": "openai_chat_completion",
|
|
766
|
+
"provider_type": "chat_completion",
|
|
489
767
|
"enable": True,
|
|
490
768
|
"api_version": "2024-05-01-preview",
|
|
491
769
|
"key": [],
|
|
492
770
|
"api_base": "",
|
|
493
771
|
"timeout": 120,
|
|
494
|
-
"model_config": {
|
|
495
|
-
|
|
496
|
-
},
|
|
772
|
+
"model_config": {"model": "gpt-4o-mini", "temperature": 0.4},
|
|
773
|
+
"custom_headers": {},
|
|
774
|
+
"custom_extra_body": {},
|
|
775
|
+
"modalities": ["text", "image", "tool_use"],
|
|
497
776
|
},
|
|
498
|
-
"xAI
|
|
777
|
+
"xAI": {
|
|
499
778
|
"id": "xai",
|
|
779
|
+
"provider": "xai",
|
|
500
780
|
"type": "openai_chat_completion",
|
|
781
|
+
"provider_type": "chat_completion",
|
|
501
782
|
"enable": True,
|
|
502
783
|
"key": [],
|
|
503
784
|
"api_base": "https://api.x.ai/v1",
|
|
504
785
|
"timeout": 120,
|
|
505
|
-
"model_config": {
|
|
506
|
-
|
|
507
|
-
},
|
|
508
|
-
|
|
509
|
-
|
|
786
|
+
"model_config": {"model": "grok-2-latest", "temperature": 0.4},
|
|
787
|
+
"custom_headers": {},
|
|
788
|
+
"custom_extra_body": {},
|
|
789
|
+
"xai_native_search": False,
|
|
790
|
+
"modalities": ["text", "image", "tool_use"],
|
|
791
|
+
},
|
|
792
|
+
"Anthropic": {
|
|
793
|
+
"hint": "注意Claude系列模型的温度调节范围为0到1.0,超出可能导致报错",
|
|
510
794
|
"id": "claude",
|
|
795
|
+
"provider": "anthropic",
|
|
511
796
|
"type": "anthropic_chat_completion",
|
|
797
|
+
"provider_type": "chat_completion",
|
|
512
798
|
"enable": True,
|
|
513
799
|
"key": [],
|
|
514
800
|
"api_base": "https://api.anthropic.com/v1",
|
|
@@ -516,52 +802,73 @@ CONFIG_METADATA_2 = {
|
|
|
516
802
|
"model_config": {
|
|
517
803
|
"model": "claude-3-5-sonnet-latest",
|
|
518
804
|
"max_tokens": 4096,
|
|
805
|
+
"temperature": 0.2,
|
|
519
806
|
},
|
|
807
|
+
"modalities": ["text", "image", "tool_use"],
|
|
520
808
|
},
|
|
521
809
|
"Ollama": {
|
|
810
|
+
"hint": "启用前请确保已正确安装并运行 Ollama 服务端,Ollama默认不带鉴权,无需修改key",
|
|
522
811
|
"id": "ollama_default",
|
|
812
|
+
"provider": "ollama",
|
|
523
813
|
"type": "openai_chat_completion",
|
|
814
|
+
"provider_type": "chat_completion",
|
|
524
815
|
"enable": True,
|
|
525
816
|
"key": ["ollama"], # ollama 的 key 默认是 ollama
|
|
526
817
|
"api_base": "http://localhost:11434/v1",
|
|
527
|
-
"model_config": {
|
|
528
|
-
|
|
529
|
-
},
|
|
818
|
+
"model_config": {"model": "llama3.1-8b", "temperature": 0.4},
|
|
819
|
+
"custom_headers": {},
|
|
820
|
+
"custom_extra_body": {},
|
|
821
|
+
"modalities": ["text", "image", "tool_use"],
|
|
530
822
|
},
|
|
531
|
-
"
|
|
823
|
+
"LM Studio": {
|
|
532
824
|
"id": "lm_studio",
|
|
825
|
+
"provider": "lm_studio",
|
|
533
826
|
"type": "openai_chat_completion",
|
|
827
|
+
"provider_type": "chat_completion",
|
|
534
828
|
"enable": True,
|
|
535
829
|
"key": ["lmstudio"],
|
|
536
830
|
"api_base": "http://localhost:1234/v1",
|
|
537
831
|
"model_config": {
|
|
538
832
|
"model": "llama-3.1-8b",
|
|
539
833
|
},
|
|
834
|
+
"custom_headers": {},
|
|
835
|
+
"custom_extra_body": {},
|
|
836
|
+
"modalities": ["text", "image", "tool_use"],
|
|
540
837
|
},
|
|
541
838
|
"Gemini(OpenAI兼容)": {
|
|
542
839
|
"id": "gemini_default",
|
|
840
|
+
"provider": "google",
|
|
543
841
|
"type": "openai_chat_completion",
|
|
842
|
+
"provider_type": "chat_completion",
|
|
544
843
|
"enable": True,
|
|
545
844
|
"key": [],
|
|
546
845
|
"api_base": "https://generativelanguage.googleapis.com/v1beta/openai/",
|
|
547
846
|
"timeout": 120,
|
|
548
847
|
"model_config": {
|
|
549
848
|
"model": "gemini-1.5-flash",
|
|
849
|
+
"temperature": 0.4,
|
|
550
850
|
},
|
|
851
|
+
"custom_headers": {},
|
|
852
|
+
"custom_extra_body": {},
|
|
853
|
+
"modalities": ["text", "image", "tool_use"],
|
|
551
854
|
},
|
|
552
|
-
"Gemini
|
|
855
|
+
"Gemini": {
|
|
553
856
|
"id": "gemini_default",
|
|
857
|
+
"provider": "google",
|
|
554
858
|
"type": "googlegenai_chat_completion",
|
|
859
|
+
"provider_type": "chat_completion",
|
|
555
860
|
"enable": True,
|
|
556
861
|
"key": [],
|
|
557
862
|
"api_base": "https://generativelanguage.googleapis.com/",
|
|
558
863
|
"timeout": 120,
|
|
559
864
|
"model_config": {
|
|
560
865
|
"model": "gemini-2.0-flash-exp",
|
|
866
|
+
"temperature": 0.4,
|
|
561
867
|
},
|
|
562
868
|
"gm_resp_image_modal": False,
|
|
563
869
|
"gm_native_search": False,
|
|
564
870
|
"gm_native_coderunner": False,
|
|
871
|
+
"gm_url_context": False,
|
|
565
872
|
"gm_safety_settings": {
|
|
566
873
|
"harassment": "BLOCK_MEDIUM_AND_ABOVE",
|
|
567
874
|
"hate_speech": "BLOCK_MEDIUM_AND_ABOVE",
|
|
@@ -571,64 +878,153 @@ CONFIG_METADATA_2 = {
|
|
|
571
878
|
"gm_thinking_config": {
|
|
572
879
|
"budget": 0,
|
|
573
880
|
},
|
|
881
|
+
"modalities": ["text", "image", "tool_use"],
|
|
574
882
|
},
|
|
575
883
|
"DeepSeek": {
|
|
576
884
|
"id": "deepseek_default",
|
|
885
|
+
"provider": "deepseek",
|
|
577
886
|
"type": "openai_chat_completion",
|
|
887
|
+
"provider_type": "chat_completion",
|
|
578
888
|
"enable": True,
|
|
579
889
|
"key": [],
|
|
580
890
|
"api_base": "https://api.deepseek.com/v1",
|
|
581
891
|
"timeout": 120,
|
|
892
|
+
"model_config": {"model": "deepseek-chat", "temperature": 0.4},
|
|
893
|
+
"custom_headers": {},
|
|
894
|
+
"custom_extra_body": {},
|
|
895
|
+
"modalities": ["text", "tool_use"],
|
|
896
|
+
},
|
|
897
|
+
"Groq": {
|
|
898
|
+
"id": "groq_default",
|
|
899
|
+
"provider": "groq",
|
|
900
|
+
"type": "groq_chat_completion",
|
|
901
|
+
"provider_type": "chat_completion",
|
|
902
|
+
"enable": True,
|
|
903
|
+
"key": [],
|
|
904
|
+
"api_base": "https://api.groq.com/openai/v1",
|
|
905
|
+
"timeout": 120,
|
|
582
906
|
"model_config": {
|
|
583
|
-
"model": "
|
|
907
|
+
"model": "openai/gpt-oss-20b",
|
|
908
|
+
"temperature": 0.4,
|
|
584
909
|
},
|
|
910
|
+
"custom_headers": {},
|
|
911
|
+
"custom_extra_body": {},
|
|
912
|
+
"modalities": ["text", "tool_use"],
|
|
585
913
|
},
|
|
586
|
-
"
|
|
587
|
-
"id": "
|
|
588
|
-
"
|
|
914
|
+
"302.AI": {
|
|
915
|
+
"id": "302ai",
|
|
916
|
+
"provider": "302ai",
|
|
917
|
+
"type": "openai_chat_completion",
|
|
918
|
+
"provider_type": "chat_completion",
|
|
589
919
|
"enable": True,
|
|
590
920
|
"key": [],
|
|
921
|
+
"api_base": "https://api.302.ai/v1",
|
|
591
922
|
"timeout": 120,
|
|
592
|
-
"
|
|
593
|
-
"
|
|
594
|
-
|
|
595
|
-
|
|
923
|
+
"model_config": {"model": "gpt-4.1-mini", "temperature": 0.4},
|
|
924
|
+
"custom_headers": {},
|
|
925
|
+
"custom_extra_body": {},
|
|
926
|
+
"modalities": ["text", "image", "tool_use"],
|
|
596
927
|
},
|
|
597
|
-
"
|
|
928
|
+
"硅基流动": {
|
|
598
929
|
"id": "siliconflow",
|
|
930
|
+
"provider": "siliconflow",
|
|
599
931
|
"type": "openai_chat_completion",
|
|
932
|
+
"provider_type": "chat_completion",
|
|
600
933
|
"enable": True,
|
|
601
934
|
"key": [],
|
|
602
935
|
"timeout": 120,
|
|
603
936
|
"api_base": "https://api.siliconflow.cn/v1",
|
|
604
937
|
"model_config": {
|
|
605
938
|
"model": "deepseek-ai/DeepSeek-V3",
|
|
939
|
+
"temperature": 0.4,
|
|
606
940
|
},
|
|
941
|
+
"custom_headers": {},
|
|
942
|
+
"custom_extra_body": {},
|
|
943
|
+
"modalities": ["text", "image", "tool_use"],
|
|
607
944
|
},
|
|
608
|
-
"
|
|
609
|
-
"id": "
|
|
945
|
+
"PPIO派欧云": {
|
|
946
|
+
"id": "ppio",
|
|
947
|
+
"provider": "ppio",
|
|
610
948
|
"type": "openai_chat_completion",
|
|
949
|
+
"provider_type": "chat_completion",
|
|
611
950
|
"enable": True,
|
|
612
951
|
"key": [],
|
|
952
|
+
"api_base": "https://api.ppinfra.com/v3/openai",
|
|
953
|
+
"timeout": 120,
|
|
954
|
+
"model_config": {
|
|
955
|
+
"model": "deepseek/deepseek-r1",
|
|
956
|
+
"temperature": 0.4,
|
|
957
|
+
},
|
|
958
|
+
"custom_headers": {},
|
|
959
|
+
"custom_extra_body": {},
|
|
960
|
+
},
|
|
961
|
+
"小马算力": {
|
|
962
|
+
"id": "tokenpony",
|
|
963
|
+
"provider": "tokenpony",
|
|
964
|
+
"type": "openai_chat_completion",
|
|
965
|
+
"provider_type": "chat_completion",
|
|
966
|
+
"enable": True,
|
|
967
|
+
"key": [],
|
|
968
|
+
"api_base": "https://api.tokenpony.cn/v1",
|
|
969
|
+
"timeout": 120,
|
|
970
|
+
"model_config": {
|
|
971
|
+
"model": "kimi-k2-instruct-0905",
|
|
972
|
+
"temperature": 0.7,
|
|
973
|
+
},
|
|
974
|
+
"custom_headers": {},
|
|
975
|
+
"custom_extra_body": {},
|
|
976
|
+
},
|
|
977
|
+
"优云智算": {
|
|
978
|
+
"id": "compshare",
|
|
979
|
+
"provider": "compshare",
|
|
980
|
+
"type": "openai_chat_completion",
|
|
981
|
+
"provider_type": "chat_completion",
|
|
982
|
+
"enable": True,
|
|
983
|
+
"key": [],
|
|
984
|
+
"api_base": "https://api.modelverse.cn/v1",
|
|
613
985
|
"timeout": 120,
|
|
614
|
-
"api_base": "https://api.moonshot.cn/v1",
|
|
615
986
|
"model_config": {
|
|
616
|
-
"model": "
|
|
987
|
+
"model": "moonshotai/Kimi-K2-Instruct",
|
|
617
988
|
},
|
|
989
|
+
"custom_headers": {},
|
|
990
|
+
"custom_extra_body": {},
|
|
991
|
+
"modalities": ["text", "image", "tool_use"],
|
|
992
|
+
},
|
|
993
|
+
"Kimi": {
|
|
994
|
+
"id": "moonshot",
|
|
995
|
+
"provider": "moonshot",
|
|
996
|
+
"type": "openai_chat_completion",
|
|
997
|
+
"provider_type": "chat_completion",
|
|
998
|
+
"enable": True,
|
|
999
|
+
"key": [],
|
|
1000
|
+
"timeout": 120,
|
|
1001
|
+
"api_base": "https://api.moonshot.cn/v1",
|
|
1002
|
+
"model_config": {"model": "moonshot-v1-8k", "temperature": 0.4},
|
|
1003
|
+
"custom_headers": {},
|
|
1004
|
+
"custom_extra_body": {},
|
|
1005
|
+
"modalities": ["text", "image", "tool_use"],
|
|
618
1006
|
},
|
|
619
|
-
"
|
|
620
|
-
"id": "
|
|
621
|
-
"
|
|
1007
|
+
"智谱 AI": {
|
|
1008
|
+
"id": "zhipu_default",
|
|
1009
|
+
"provider": "zhipu",
|
|
1010
|
+
"type": "zhipu_chat_completion",
|
|
1011
|
+
"provider_type": "chat_completion",
|
|
622
1012
|
"enable": True,
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
"
|
|
626
|
-
"
|
|
627
|
-
|
|
1013
|
+
"key": [],
|
|
1014
|
+
"timeout": 120,
|
|
1015
|
+
"api_base": "https://open.bigmodel.cn/api/paas/v4/",
|
|
1016
|
+
"model_config": {
|
|
1017
|
+
"model": "glm-4-flash",
|
|
1018
|
+
},
|
|
1019
|
+
"custom_headers": {},
|
|
1020
|
+
"custom_extra_body": {},
|
|
1021
|
+
"modalities": ["text", "image", "tool_use"],
|
|
628
1022
|
},
|
|
629
1023
|
"Dify": {
|
|
630
1024
|
"id": "dify_app_default",
|
|
1025
|
+
"provider": "dify",
|
|
631
1026
|
"type": "dify",
|
|
1027
|
+
"provider_type": "agent_runner",
|
|
632
1028
|
"enable": True,
|
|
633
1029
|
"dify_api_type": "chat",
|
|
634
1030
|
"dify_api_key": "",
|
|
@@ -637,10 +1033,25 @@ CONFIG_METADATA_2 = {
|
|
|
637
1033
|
"dify_query_input_key": "astrbot_text_query",
|
|
638
1034
|
"variables": {},
|
|
639
1035
|
"timeout": 60,
|
|
1036
|
+
"hint": "请确保你在 AstrBot 里设置的 APP 类型和 Dify 里面创建的应用的类型一致!",
|
|
640
1037
|
},
|
|
641
|
-
"
|
|
1038
|
+
"Coze": {
|
|
1039
|
+
"id": "coze",
|
|
1040
|
+
"provider": "coze",
|
|
1041
|
+
"provider_type": "agent_runner",
|
|
1042
|
+
"type": "coze",
|
|
1043
|
+
"enable": True,
|
|
1044
|
+
"coze_api_key": "",
|
|
1045
|
+
"bot_id": "",
|
|
1046
|
+
"coze_api_base": "https://api.coze.cn",
|
|
1047
|
+
"timeout": 60,
|
|
1048
|
+
# "auto_save_history": True,
|
|
1049
|
+
},
|
|
1050
|
+
"阿里云百炼应用": {
|
|
642
1051
|
"id": "dashscope",
|
|
1052
|
+
"provider": "dashscope",
|
|
643
1053
|
"type": "dashscope",
|
|
1054
|
+
"provider_type": "agent_runner",
|
|
644
1055
|
"enable": True,
|
|
645
1056
|
"dashscope_app_type": "agent",
|
|
646
1057
|
"dashscope_api_key": "",
|
|
@@ -653,40 +1064,66 @@ CONFIG_METADATA_2 = {
|
|
|
653
1064
|
"variables": {},
|
|
654
1065
|
"timeout": 60,
|
|
655
1066
|
},
|
|
1067
|
+
"ModelScope": {
|
|
1068
|
+
"id": "modelscope",
|
|
1069
|
+
"provider": "modelscope",
|
|
1070
|
+
"type": "openai_chat_completion",
|
|
1071
|
+
"provider_type": "chat_completion",
|
|
1072
|
+
"enable": True,
|
|
1073
|
+
"key": [],
|
|
1074
|
+
"timeout": 120,
|
|
1075
|
+
"api_base": "https://api-inference.modelscope.cn/v1",
|
|
1076
|
+
"model_config": {"model": "Qwen/Qwen3-32B", "temperature": 0.4},
|
|
1077
|
+
"custom_headers": {},
|
|
1078
|
+
"custom_extra_body": {},
|
|
1079
|
+
"modalities": ["text", "image", "tool_use"],
|
|
1080
|
+
},
|
|
656
1081
|
"FastGPT": {
|
|
657
1082
|
"id": "fastgpt",
|
|
1083
|
+
"provider": "fastgpt",
|
|
658
1084
|
"type": "openai_chat_completion",
|
|
1085
|
+
"provider_type": "chat_completion",
|
|
659
1086
|
"enable": True,
|
|
660
1087
|
"key": [],
|
|
661
1088
|
"api_base": "https://api.fastgpt.in/api/v1",
|
|
662
1089
|
"timeout": 60,
|
|
1090
|
+
"custom_headers": {},
|
|
1091
|
+
"custom_extra_body": {},
|
|
663
1092
|
},
|
|
664
1093
|
"Whisper(API)": {
|
|
665
1094
|
"id": "whisper",
|
|
1095
|
+
"provider": "openai",
|
|
666
1096
|
"type": "openai_whisper_api",
|
|
1097
|
+
"provider_type": "speech_to_text",
|
|
667
1098
|
"enable": False,
|
|
668
1099
|
"api_key": "",
|
|
669
1100
|
"api_base": "",
|
|
670
1101
|
"model": "whisper-1",
|
|
671
1102
|
},
|
|
672
|
-
"Whisper(
|
|
673
|
-
"
|
|
674
|
-
"
|
|
675
|
-
"id": "whisper",
|
|
1103
|
+
"Whisper(Local)": {
|
|
1104
|
+
"hint": "启用前请 pip 安装 openai-whisper 库(N卡用户大约下载 2GB,主要是 torch 和 cuda,CPU 用户大约下载 1 GB),并且安装 ffmpeg。否则将无法正常转文字。",
|
|
1105
|
+
"provider": "openai",
|
|
676
1106
|
"type": "openai_whisper_selfhost",
|
|
1107
|
+
"provider_type": "speech_to_text",
|
|
1108
|
+
"enable": False,
|
|
1109
|
+
"id": "whisper_selfhost",
|
|
677
1110
|
"model": "tiny",
|
|
678
1111
|
},
|
|
679
|
-
"
|
|
680
|
-
"
|
|
1112
|
+
"SenseVoice(Local)": {
|
|
1113
|
+
"hint": "启用前请 pip 安装 funasr、funasr_onnx、torchaudio、torch、modelscope、jieba 库(默认使用CPU,大约下载 1 GB),并且安装 ffmpeg。否则将无法正常转文字。",
|
|
1114
|
+
"type": "sensevoice_stt_selfhost",
|
|
1115
|
+
"provider": "sensevoice",
|
|
1116
|
+
"provider_type": "speech_to_text",
|
|
681
1117
|
"enable": False,
|
|
682
1118
|
"id": "sensevoice",
|
|
683
|
-
"type": "sensevoice_stt_selfhost",
|
|
684
1119
|
"stt_model": "iic/SenseVoiceSmall",
|
|
685
1120
|
"is_emotion": False,
|
|
686
1121
|
},
|
|
687
|
-
"
|
|
1122
|
+
"OpenAI TTS(API)": {
|
|
688
1123
|
"id": "openai_tts",
|
|
689
1124
|
"type": "openai_tts_api",
|
|
1125
|
+
"provider": "openai",
|
|
1126
|
+
"provider_type": "text_to_speech",
|
|
690
1127
|
"enable": False,
|
|
691
1128
|
"api_key": "",
|
|
692
1129
|
"api_base": "",
|
|
@@ -694,83 +1131,559 @@ CONFIG_METADATA_2 = {
|
|
|
694
1131
|
"openai-tts-voice": "alloy",
|
|
695
1132
|
"timeout": "20",
|
|
696
1133
|
},
|
|
697
|
-
"
|
|
698
|
-
"
|
|
1134
|
+
"Edge TTS": {
|
|
1135
|
+
"hint": "提示:使用这个服务前需要安装有 ffmpeg,并且可以直接在终端调用 ffmpeg 指令。",
|
|
699
1136
|
"id": "edge_tts",
|
|
1137
|
+
"provider": "microsoft",
|
|
700
1138
|
"type": "edge_tts",
|
|
1139
|
+
"provider_type": "text_to_speech",
|
|
701
1140
|
"enable": False,
|
|
702
1141
|
"edge-tts-voice": "zh-CN-XiaoxiaoNeural",
|
|
1142
|
+
"rate": "+0%",
|
|
1143
|
+
"volume": "+0%",
|
|
1144
|
+
"pitch": "+0Hz",
|
|
703
1145
|
"timeout": 20,
|
|
704
1146
|
},
|
|
705
|
-
"
|
|
1147
|
+
"GSV TTS(Local)": {
|
|
1148
|
+
"id": "gsv_tts",
|
|
1149
|
+
"enable": False,
|
|
1150
|
+
"provider": "gpt_sovits",
|
|
1151
|
+
"type": "gsv_tts_selfhost",
|
|
1152
|
+
"provider_type": "text_to_speech",
|
|
1153
|
+
"api_base": "http://127.0.0.1:9880",
|
|
1154
|
+
"gpt_weights_path": "",
|
|
1155
|
+
"sovits_weights_path": "",
|
|
1156
|
+
"timeout": 60,
|
|
1157
|
+
"gsv_default_parms": {
|
|
1158
|
+
"gsv_ref_audio_path": "",
|
|
1159
|
+
"gsv_prompt_text": "",
|
|
1160
|
+
"gsv_prompt_lang": "zh",
|
|
1161
|
+
"gsv_aux_ref_audio_paths": "",
|
|
1162
|
+
"gsv_text_lang": "zh",
|
|
1163
|
+
"gsv_top_k": 5,
|
|
1164
|
+
"gsv_top_p": 1.0,
|
|
1165
|
+
"gsv_temperature": 1.0,
|
|
1166
|
+
"gsv_text_split_method": "cut3",
|
|
1167
|
+
"gsv_batch_size": 1,
|
|
1168
|
+
"gsv_batch_threshold": 0.75,
|
|
1169
|
+
"gsv_split_bucket": True,
|
|
1170
|
+
"gsv_speed_factor": 1,
|
|
1171
|
+
"gsv_fragment_interval": 0.3,
|
|
1172
|
+
"gsv_streaming_mode": False,
|
|
1173
|
+
"gsv_seed": -1,
|
|
1174
|
+
"gsv_parallel_infer": True,
|
|
1175
|
+
"gsv_repetition_penalty": 1.35,
|
|
1176
|
+
"gsv_media_type": "wav",
|
|
1177
|
+
},
|
|
1178
|
+
},
|
|
1179
|
+
"GSVI TTS(API)": {
|
|
706
1180
|
"id": "gsvi_tts",
|
|
707
1181
|
"type": "gsvi_tts_api",
|
|
1182
|
+
"provider": "gpt_sovits_inference",
|
|
1183
|
+
"provider_type": "text_to_speech",
|
|
708
1184
|
"api_base": "http://127.0.0.1:5000",
|
|
709
1185
|
"character": "",
|
|
710
1186
|
"emotion": "default",
|
|
711
1187
|
"enable": False,
|
|
712
1188
|
"timeout": 20,
|
|
713
1189
|
},
|
|
714
|
-
"
|
|
1190
|
+
"FishAudio TTS(API)": {
|
|
715
1191
|
"id": "fishaudio_tts",
|
|
1192
|
+
"provider": "fishaudio",
|
|
716
1193
|
"type": "fishaudio_tts_api",
|
|
1194
|
+
"provider_type": "text_to_speech",
|
|
717
1195
|
"enable": False,
|
|
718
1196
|
"api_key": "",
|
|
719
1197
|
"api_base": "https://api.fish.audio/v1",
|
|
720
1198
|
"fishaudio-tts-character": "可莉",
|
|
1199
|
+
"fishaudio-tts-reference-id": "",
|
|
721
1200
|
"timeout": "20",
|
|
722
1201
|
},
|
|
723
|
-
"阿里云百炼
|
|
1202
|
+
"阿里云百炼 TTS(API)": {
|
|
1203
|
+
"hint": "API Key 从 https://bailian.console.aliyun.com/?tab=model#/api-key 获取。模型和音色的选择文档请参考: 阿里云百炼语音合成音色名称。具体可参考 https://help.aliyun.com/zh/model-studio/speech-synthesis-and-speech-recognition",
|
|
724
1204
|
"id": "dashscope_tts",
|
|
1205
|
+
"provider": "dashscope",
|
|
725
1206
|
"type": "dashscope_tts",
|
|
1207
|
+
"provider_type": "text_to_speech",
|
|
726
1208
|
"enable": False,
|
|
727
1209
|
"api_key": "",
|
|
728
1210
|
"model": "cosyvoice-v1",
|
|
729
1211
|
"dashscope_tts_voice": "loongstella",
|
|
730
1212
|
"timeout": "20",
|
|
731
1213
|
},
|
|
1214
|
+
"Azure TTS": {
|
|
1215
|
+
"id": "azure_tts",
|
|
1216
|
+
"type": "azure_tts",
|
|
1217
|
+
"provider": "azure",
|
|
1218
|
+
"provider_type": "text_to_speech",
|
|
1219
|
+
"enable": True,
|
|
1220
|
+
"azure_tts_voice": "zh-CN-YunxiaNeural",
|
|
1221
|
+
"azure_tts_style": "cheerful",
|
|
1222
|
+
"azure_tts_role": "Boy",
|
|
1223
|
+
"azure_tts_rate": "1",
|
|
1224
|
+
"azure_tts_volume": "100",
|
|
1225
|
+
"azure_tts_subscription_key": "",
|
|
1226
|
+
"azure_tts_region": "eastus",
|
|
1227
|
+
},
|
|
1228
|
+
"MiniMax TTS(API)": {
|
|
1229
|
+
"id": "minimax_tts",
|
|
1230
|
+
"type": "minimax_tts_api",
|
|
1231
|
+
"provider": "minimax",
|
|
1232
|
+
"provider_type": "text_to_speech",
|
|
1233
|
+
"enable": False,
|
|
1234
|
+
"api_key": "",
|
|
1235
|
+
"api_base": "https://api.minimax.chat/v1/t2a_v2",
|
|
1236
|
+
"minimax-group-id": "",
|
|
1237
|
+
"model": "speech-02-turbo",
|
|
1238
|
+
"minimax-langboost": "auto",
|
|
1239
|
+
"minimax-voice-speed": 1.0,
|
|
1240
|
+
"minimax-voice-vol": 1.0,
|
|
1241
|
+
"minimax-voice-pitch": 0,
|
|
1242
|
+
"minimax-is-timber-weight": False,
|
|
1243
|
+
"minimax-voice-id": "female-shaonv",
|
|
1244
|
+
"minimax-timber-weight": '[\n {\n "voice_id": "Chinese (Mandarin)_Warm_Girl",\n "weight": 25\n },\n {\n "voice_id": "Chinese (Mandarin)_BashfulGirl",\n "weight": 50\n }\n]',
|
|
1245
|
+
"minimax-voice-emotion": "neutral",
|
|
1246
|
+
"minimax-voice-latex": False,
|
|
1247
|
+
"minimax-voice-english-normalization": False,
|
|
1248
|
+
"timeout": 20,
|
|
1249
|
+
},
|
|
1250
|
+
"火山引擎_TTS(API)": {
|
|
1251
|
+
"id": "volcengine_tts",
|
|
1252
|
+
"type": "volcengine_tts",
|
|
1253
|
+
"provider": "volcengine",
|
|
1254
|
+
"provider_type": "text_to_speech",
|
|
1255
|
+
"enable": False,
|
|
1256
|
+
"api_key": "",
|
|
1257
|
+
"appid": "",
|
|
1258
|
+
"volcengine_cluster": "volcano_tts",
|
|
1259
|
+
"volcengine_voice_type": "",
|
|
1260
|
+
"volcengine_speed_ratio": 1.0,
|
|
1261
|
+
"api_base": "https://openspeech.bytedance.com/api/v1/tts",
|
|
1262
|
+
"timeout": 20,
|
|
1263
|
+
},
|
|
1264
|
+
"Gemini TTS": {
|
|
1265
|
+
"id": "gemini_tts",
|
|
1266
|
+
"type": "gemini_tts",
|
|
1267
|
+
"provider": "google",
|
|
1268
|
+
"provider_type": "text_to_speech",
|
|
1269
|
+
"enable": False,
|
|
1270
|
+
"gemini_tts_api_key": "",
|
|
1271
|
+
"gemini_tts_api_base": "",
|
|
1272
|
+
"gemini_tts_timeout": 20,
|
|
1273
|
+
"gemini_tts_model": "gemini-2.5-flash-preview-tts",
|
|
1274
|
+
"gemini_tts_prefix": "",
|
|
1275
|
+
"gemini_tts_voice_name": "Leda",
|
|
1276
|
+
},
|
|
1277
|
+
"OpenAI Embedding": {
|
|
1278
|
+
"id": "openai_embedding",
|
|
1279
|
+
"type": "openai_embedding",
|
|
1280
|
+
"provider": "openai",
|
|
1281
|
+
"provider_type": "embedding",
|
|
1282
|
+
"enable": True,
|
|
1283
|
+
"embedding_api_key": "",
|
|
1284
|
+
"embedding_api_base": "",
|
|
1285
|
+
"embedding_model": "",
|
|
1286
|
+
"embedding_dimensions": 1024,
|
|
1287
|
+
"timeout": 20,
|
|
1288
|
+
},
|
|
1289
|
+
"Gemini Embedding": {
|
|
1290
|
+
"id": "gemini_embedding",
|
|
1291
|
+
"type": "gemini_embedding",
|
|
1292
|
+
"provider": "google",
|
|
1293
|
+
"provider_type": "embedding",
|
|
1294
|
+
"enable": True,
|
|
1295
|
+
"embedding_api_key": "",
|
|
1296
|
+
"embedding_api_base": "",
|
|
1297
|
+
"embedding_model": "gemini-embedding-exp-03-07",
|
|
1298
|
+
"embedding_dimensions": 768,
|
|
1299
|
+
"timeout": 20,
|
|
1300
|
+
},
|
|
1301
|
+
"vLLM Rerank": {
|
|
1302
|
+
"id": "vllm_rerank",
|
|
1303
|
+
"type": "vllm_rerank",
|
|
1304
|
+
"provider": "vllm",
|
|
1305
|
+
"provider_type": "rerank",
|
|
1306
|
+
"enable": True,
|
|
1307
|
+
"rerank_api_key": "",
|
|
1308
|
+
"rerank_api_base": "http://127.0.0.1:8000",
|
|
1309
|
+
"rerank_model": "BAAI/bge-reranker-base",
|
|
1310
|
+
"timeout": 20,
|
|
1311
|
+
},
|
|
1312
|
+
"Xinference Rerank": {
|
|
1313
|
+
"id": "xinference_rerank",
|
|
1314
|
+
"type": "xinference_rerank",
|
|
1315
|
+
"provider": "xinference",
|
|
1316
|
+
"provider_type": "rerank",
|
|
1317
|
+
"enable": True,
|
|
1318
|
+
"rerank_api_key": "",
|
|
1319
|
+
"rerank_api_base": "http://127.0.0.1:9997",
|
|
1320
|
+
"rerank_model": "BAAI/bge-reranker-base",
|
|
1321
|
+
"timeout": 20,
|
|
1322
|
+
"launch_model_if_not_running": False,
|
|
1323
|
+
},
|
|
1324
|
+
"阿里云百炼重排序": {
|
|
1325
|
+
"id": "bailian_rerank",
|
|
1326
|
+
"type": "bailian_rerank",
|
|
1327
|
+
"provider": "bailian",
|
|
1328
|
+
"provider_type": "rerank",
|
|
1329
|
+
"enable": True,
|
|
1330
|
+
"rerank_api_key": "",
|
|
1331
|
+
"rerank_api_base": "https://dashscope.aliyuncs.com/api/v1/services/rerank/text-rerank/text-rerank",
|
|
1332
|
+
"rerank_model": "qwen3-rerank",
|
|
1333
|
+
"timeout": 30,
|
|
1334
|
+
"return_documents": False,
|
|
1335
|
+
"instruct": "",
|
|
1336
|
+
},
|
|
1337
|
+
"Xinference STT": {
|
|
1338
|
+
"id": "xinference_stt",
|
|
1339
|
+
"type": "xinference_stt",
|
|
1340
|
+
"provider": "xinference",
|
|
1341
|
+
"provider_type": "speech_to_text",
|
|
1342
|
+
"enable": False,
|
|
1343
|
+
"api_key": "",
|
|
1344
|
+
"api_base": "http://127.0.0.1:9997",
|
|
1345
|
+
"model": "whisper-large-v3",
|
|
1346
|
+
"timeout": 180,
|
|
1347
|
+
"launch_model_if_not_running": False,
|
|
1348
|
+
},
|
|
732
1349
|
},
|
|
733
1350
|
"items": {
|
|
734
|
-
"
|
|
735
|
-
"description": "
|
|
1351
|
+
"xai_native_search": {
|
|
1352
|
+
"description": "启用原生搜索功能",
|
|
1353
|
+
"type": "bool",
|
|
1354
|
+
"hint": "启用后,将通过 xAI 的 Chat Completions 原生 Live Search 进行联网检索(按需计费)。仅对 xAI 提供商生效。",
|
|
1355
|
+
"condition": {"provider": "xai"},
|
|
1356
|
+
},
|
|
1357
|
+
"rerank_api_base": {
|
|
1358
|
+
"description": "重排序模型 API Base URL",
|
|
736
1359
|
"type": "string",
|
|
737
|
-
"hint": "
|
|
1360
|
+
"hint": "AstrBot 会在请求时在末尾加上 /v1/rerank。",
|
|
738
1361
|
},
|
|
739
|
-
"
|
|
740
|
-
"description": "
|
|
741
|
-
"type": "
|
|
742
|
-
"hint": "
|
|
1362
|
+
"rerank_api_key": {
|
|
1363
|
+
"description": "API Key",
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"hint": "如果不需要 API Key, 请留空。",
|
|
743
1366
|
},
|
|
744
|
-
"
|
|
745
|
-
"description": "
|
|
1367
|
+
"rerank_model": {
|
|
1368
|
+
"description": "重排序模型名称",
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
},
|
|
1371
|
+
"return_documents": {
|
|
1372
|
+
"description": "是否在排序结果中返回文档原文",
|
|
746
1373
|
"type": "bool",
|
|
747
|
-
"hint": "
|
|
748
|
-
"obvious_hint": True,
|
|
1374
|
+
"hint": "默认值false,以减少网络传输开销。",
|
|
749
1375
|
},
|
|
750
|
-
"
|
|
751
|
-
"description": "
|
|
1376
|
+
"instruct": {
|
|
1377
|
+
"description": "自定义排序任务类型说明",
|
|
1378
|
+
"type": "string",
|
|
1379
|
+
"hint": "仅在使用 qwen3-rerank 模型时生效。建议使用英文撰写。",
|
|
1380
|
+
},
|
|
1381
|
+
"launch_model_if_not_running": {
|
|
1382
|
+
"description": "模型未运行时自动启动",
|
|
752
1383
|
"type": "bool",
|
|
753
|
-
"hint": "
|
|
754
|
-
"obvious_hint": True,
|
|
1384
|
+
"hint": "如果模型当前未在 Xinference 服务中运行,是否尝试自动启动它。在生产环境中建议关闭。",
|
|
755
1385
|
},
|
|
756
|
-
"
|
|
757
|
-
"description": "
|
|
1386
|
+
"modalities": {
|
|
1387
|
+
"description": "模型能力",
|
|
1388
|
+
"type": "list",
|
|
1389
|
+
"items": {"type": "string"},
|
|
1390
|
+
"options": ["text", "image", "tool_use"],
|
|
1391
|
+
"labels": ["文本", "图像", "工具使用"],
|
|
1392
|
+
"render_type": "checkbox",
|
|
1393
|
+
"hint": "模型支持的模态。如所填写的模型不支持图像,请取消勾选图像。",
|
|
1394
|
+
},
|
|
1395
|
+
"custom_headers": {
|
|
1396
|
+
"description": "自定义添加请求头",
|
|
1397
|
+
"type": "dict",
|
|
1398
|
+
"items": {},
|
|
1399
|
+
"hint": "此处添加的键值对将被合并到 OpenAI SDK 的 default_headers 中,用于自定义 HTTP 请求头。值必须为字符串。",
|
|
1400
|
+
},
|
|
1401
|
+
"custom_extra_body": {
|
|
1402
|
+
"description": "自定义请求体参数",
|
|
1403
|
+
"type": "dict",
|
|
1404
|
+
"items": {},
|
|
1405
|
+
"hint": "此处添加的键值对将被合并到发送给 API 的 extra_body 中。值可以是字符串、数字或布尔值。",
|
|
1406
|
+
},
|
|
1407
|
+
"provider": {
|
|
1408
|
+
"type": "string",
|
|
1409
|
+
"invisible": True,
|
|
1410
|
+
},
|
|
1411
|
+
"gpt_weights_path": {
|
|
1412
|
+
"description": "GPT模型文件路径",
|
|
1413
|
+
"type": "string",
|
|
1414
|
+
"hint": "即“.ckpt”后缀的文件,请使用绝对路径,路径两端不要带双引号,不填则默认用GPT_SoVITS内置的SoVITS模型(建议直接在GPT_SoVITS中改默认模型)",
|
|
1415
|
+
},
|
|
1416
|
+
"sovits_weights_path": {
|
|
1417
|
+
"description": "SoVITS模型文件路径",
|
|
1418
|
+
"type": "string",
|
|
1419
|
+
"hint": "即“.pth”后缀的文件,请使用绝对路径,路径两端不要带双引号,不填则默认用GPT_SoVITS内置的SoVITS模型(建议直接在GPT_SoVITS中改默认模型)",
|
|
1420
|
+
},
|
|
1421
|
+
"gsv_default_parms": {
|
|
1422
|
+
"description": "GPT_SoVITS默认参数",
|
|
1423
|
+
"hint": "参考音频文件路径、参考音频文本必填,其他参数根据个人爱好自行填写",
|
|
758
1424
|
"type": "object",
|
|
759
|
-
"hint": "设置模型输入的内容安全过滤级别。过滤级别分类为NONE(不屏蔽)、HIGH(高风险时屏蔽)、MEDIUM_AND_ABOVE(中等风险及以上屏蔽)、LOW_AND_ABOVE(低风险及以上时屏蔽),具体参见Gemini API文档。",
|
|
760
1425
|
"items": {
|
|
761
|
-
"
|
|
762
|
-
"description": "
|
|
1426
|
+
"gsv_ref_audio_path": {
|
|
1427
|
+
"description": "参考音频文件路径",
|
|
763
1428
|
"type": "string",
|
|
764
|
-
"hint": "
|
|
765
|
-
"options": [
|
|
766
|
-
"BLOCK_NONE",
|
|
767
|
-
"BLOCK_ONLY_HIGH",
|
|
768
|
-
"BLOCK_MEDIUM_AND_ABOVE",
|
|
769
|
-
"BLOCK_LOW_AND_ABOVE",
|
|
770
|
-
],
|
|
1429
|
+
"hint": "必填!请使用绝对路径!路径两端不要带双引号!",
|
|
771
1430
|
},
|
|
772
|
-
"
|
|
773
|
-
"description": "
|
|
1431
|
+
"gsv_prompt_text": {
|
|
1432
|
+
"description": "参考音频文本",
|
|
1433
|
+
"type": "string",
|
|
1434
|
+
"hint": "必填!请填写参考音频讲述的文本",
|
|
1435
|
+
},
|
|
1436
|
+
"gsv_prompt_lang": {
|
|
1437
|
+
"description": "参考音频文本语言",
|
|
1438
|
+
"type": "string",
|
|
1439
|
+
"hint": "请填写参考音频讲述的文本的语言,默认为中文",
|
|
1440
|
+
},
|
|
1441
|
+
"gsv_aux_ref_audio_paths": {
|
|
1442
|
+
"description": "辅助参考音频文件路径",
|
|
1443
|
+
"type": "string",
|
|
1444
|
+
"hint": "辅助参考音频文件,可不填",
|
|
1445
|
+
},
|
|
1446
|
+
"gsv_text_lang": {
|
|
1447
|
+
"description": "文本语言",
|
|
1448
|
+
"type": "string",
|
|
1449
|
+
"hint": "默认为中文",
|
|
1450
|
+
},
|
|
1451
|
+
"gsv_top_k": {
|
|
1452
|
+
"description": "生成语音的多样性",
|
|
1453
|
+
"type": "int",
|
|
1454
|
+
"hint": "",
|
|
1455
|
+
},
|
|
1456
|
+
"gsv_top_p": {
|
|
1457
|
+
"description": "核采样的阈值",
|
|
1458
|
+
"type": "float",
|
|
1459
|
+
"hint": "",
|
|
1460
|
+
},
|
|
1461
|
+
"gsv_temperature": {
|
|
1462
|
+
"description": "生成语音的随机性",
|
|
1463
|
+
"type": "float",
|
|
1464
|
+
"hint": "",
|
|
1465
|
+
},
|
|
1466
|
+
"gsv_text_split_method": {
|
|
1467
|
+
"description": "切分文本的方法",
|
|
1468
|
+
"type": "string",
|
|
1469
|
+
"hint": "可选值: `cut0`:不切分 `cut1`:四句一切 `cut2`:50字一切 `cut3`:按中文句号切 `cut4`:按英文句号切 `cut5`:按标点符号切",
|
|
1470
|
+
"options": [
|
|
1471
|
+
"cut0",
|
|
1472
|
+
"cut1",
|
|
1473
|
+
"cut2",
|
|
1474
|
+
"cut3",
|
|
1475
|
+
"cut4",
|
|
1476
|
+
"cut5",
|
|
1477
|
+
],
|
|
1478
|
+
},
|
|
1479
|
+
"gsv_batch_size": {
|
|
1480
|
+
"description": "批处理大小",
|
|
1481
|
+
"type": "int",
|
|
1482
|
+
"hint": "",
|
|
1483
|
+
},
|
|
1484
|
+
"gsv_batch_threshold": {
|
|
1485
|
+
"description": "批处理阈值",
|
|
1486
|
+
"type": "float",
|
|
1487
|
+
"hint": "",
|
|
1488
|
+
},
|
|
1489
|
+
"gsv_split_bucket": {
|
|
1490
|
+
"description": "将文本分割成桶以便并行处理",
|
|
1491
|
+
"type": "bool",
|
|
1492
|
+
"hint": "",
|
|
1493
|
+
},
|
|
1494
|
+
"gsv_speed_factor": {
|
|
1495
|
+
"description": "语音播放速度",
|
|
1496
|
+
"type": "float",
|
|
1497
|
+
"hint": "1为原始语速",
|
|
1498
|
+
},
|
|
1499
|
+
"gsv_fragment_interval": {
|
|
1500
|
+
"description": "语音片段之间的间隔时间",
|
|
1501
|
+
"type": "float",
|
|
1502
|
+
"hint": "",
|
|
1503
|
+
},
|
|
1504
|
+
"gsv_streaming_mode": {
|
|
1505
|
+
"description": "启用流模式",
|
|
1506
|
+
"type": "bool",
|
|
1507
|
+
"hint": "",
|
|
1508
|
+
},
|
|
1509
|
+
"gsv_seed": {
|
|
1510
|
+
"description": "随机种子",
|
|
1511
|
+
"type": "int",
|
|
1512
|
+
"hint": "用于结果的可重复性",
|
|
1513
|
+
},
|
|
1514
|
+
"gsv_parallel_infer": {
|
|
1515
|
+
"description": "并行执行推理",
|
|
1516
|
+
"type": "bool",
|
|
1517
|
+
"hint": "",
|
|
1518
|
+
},
|
|
1519
|
+
"gsv_repetition_penalty": {
|
|
1520
|
+
"description": "重复惩罚因子",
|
|
1521
|
+
"type": "float",
|
|
1522
|
+
"hint": "",
|
|
1523
|
+
},
|
|
1524
|
+
"gsv_media_type": {
|
|
1525
|
+
"description": "输出媒体的类型",
|
|
1526
|
+
"type": "string",
|
|
1527
|
+
"hint": "建议用wav",
|
|
1528
|
+
},
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
"embedding_dimensions": {
|
|
1532
|
+
"description": "嵌入维度",
|
|
1533
|
+
"type": "int",
|
|
1534
|
+
"hint": "嵌入向量的维度。根据模型不同,可能需要调整,请参考具体模型的文档。此配置项请务必填写正确,否则将导致向量数据库无法正常工作。",
|
|
1535
|
+
"_special": "get_embedding_dim",
|
|
1536
|
+
},
|
|
1537
|
+
"embedding_model": {
|
|
1538
|
+
"description": "嵌入模型",
|
|
1539
|
+
"type": "string",
|
|
1540
|
+
"hint": "嵌入模型名称。",
|
|
1541
|
+
},
|
|
1542
|
+
"embedding_api_key": {
|
|
1543
|
+
"description": "API Key",
|
|
1544
|
+
"type": "string",
|
|
1545
|
+
},
|
|
1546
|
+
"embedding_api_base": {
|
|
1547
|
+
"description": "API Base URL",
|
|
1548
|
+
"type": "string",
|
|
1549
|
+
},
|
|
1550
|
+
"volcengine_cluster": {
|
|
1551
|
+
"type": "string",
|
|
1552
|
+
"description": "火山引擎集群",
|
|
1553
|
+
"hint": "若使用语音复刻大模型,可选volcano_icl或volcano_icl_concurr,默认使用volcano_tts",
|
|
1554
|
+
},
|
|
1555
|
+
"volcengine_voice_type": {
|
|
1556
|
+
"type": "string",
|
|
1557
|
+
"description": "火山引擎音色",
|
|
1558
|
+
"hint": "输入声音id(Voice_type)",
|
|
1559
|
+
},
|
|
1560
|
+
"volcengine_speed_ratio": {
|
|
1561
|
+
"type": "float",
|
|
1562
|
+
"description": "语速设置",
|
|
1563
|
+
"hint": "语速设置,范围为 0.2 到 3.0,默认值为 1.0",
|
|
1564
|
+
},
|
|
1565
|
+
"volcengine_volume_ratio": {
|
|
1566
|
+
"type": "float",
|
|
1567
|
+
"description": "音量设置",
|
|
1568
|
+
"hint": "音量设置,范围为 0.0 到 2.0,默认值为 1.0",
|
|
1569
|
+
},
|
|
1570
|
+
"azure_tts_voice": {
|
|
1571
|
+
"type": "string",
|
|
1572
|
+
"description": "音色设置",
|
|
1573
|
+
"hint": "API 音色",
|
|
1574
|
+
},
|
|
1575
|
+
"azure_tts_style": {
|
|
1576
|
+
"type": "string",
|
|
1577
|
+
"description": "风格设置",
|
|
1578
|
+
"hint": "声音特定的讲话风格。 可以表达快乐、同情和平静等情绪。",
|
|
1579
|
+
},
|
|
1580
|
+
"azure_tts_role": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"description": "模仿设置(可选)",
|
|
1583
|
+
"hint": "讲话角色扮演。 声音可以模仿不同的年龄和性别,但声音名称不会更改。 例如,男性语音可以提高音调和改变语调来模拟女性语音,但语音名称不会更改。 如果角色缺失或不受声音的支持,则会忽略此属性。",
|
|
1584
|
+
"options": [
|
|
1585
|
+
"Boy",
|
|
1586
|
+
"Girl",
|
|
1587
|
+
"YoungAdultFemale",
|
|
1588
|
+
"YoungAdultMale",
|
|
1589
|
+
"OlderAdultFemale",
|
|
1590
|
+
"OlderAdultMale",
|
|
1591
|
+
"SeniorFemale",
|
|
1592
|
+
"SeniorMale",
|
|
1593
|
+
"禁用",
|
|
1594
|
+
],
|
|
1595
|
+
},
|
|
1596
|
+
"azure_tts_rate": {
|
|
1597
|
+
"type": "string",
|
|
1598
|
+
"description": "语速设置",
|
|
1599
|
+
"hint": "指示文本的讲出速率。可在字词或句子层面应用语速。 速率变化应为原始音频的 0.5 到 2 倍。",
|
|
1600
|
+
},
|
|
1601
|
+
"azure_tts_volume": {
|
|
1602
|
+
"type": "string",
|
|
1603
|
+
"description": "语音音量设置",
|
|
1604
|
+
"hint": "指示语音的音量级别。 可在句子层面应用音量的变化。以从 0.0 到 100.0(从最安静到最大声,例如 75)的数字表示。 默认值为 100.0。",
|
|
1605
|
+
},
|
|
1606
|
+
"azure_tts_region": {
|
|
1607
|
+
"type": "string",
|
|
1608
|
+
"description": "API 地区",
|
|
1609
|
+
"hint": "Azure_TTS 处理数据所在区域,具体参考 https://learn.microsoft.com/zh-cn/azure/ai-services/speech-service/regions",
|
|
1610
|
+
"options": [
|
|
1611
|
+
"southafricanorth",
|
|
1612
|
+
"eastasia",
|
|
1613
|
+
"southeastasia",
|
|
1614
|
+
"australiaeast",
|
|
1615
|
+
"centralindia",
|
|
1616
|
+
"japaneast",
|
|
1617
|
+
"japanwest",
|
|
1618
|
+
"koreacentral",
|
|
1619
|
+
"canadacentral",
|
|
1620
|
+
"northeurope",
|
|
1621
|
+
"westeurope",
|
|
1622
|
+
"francecentral",
|
|
1623
|
+
"germanywestcentral",
|
|
1624
|
+
"norwayeast",
|
|
1625
|
+
"swedencentral",
|
|
1626
|
+
"switzerlandnorth",
|
|
1627
|
+
"switzerlandwest",
|
|
1628
|
+
"uksouth",
|
|
1629
|
+
"uaenorth",
|
|
1630
|
+
"brazilsouth",
|
|
1631
|
+
"qatarcentral",
|
|
1632
|
+
"centralus",
|
|
1633
|
+
"eastus",
|
|
1634
|
+
"eastus2",
|
|
1635
|
+
"northcentralus",
|
|
1636
|
+
"southcentralus",
|
|
1637
|
+
"westcentralus",
|
|
1638
|
+
"westus",
|
|
1639
|
+
"westus2",
|
|
1640
|
+
"westus3",
|
|
1641
|
+
],
|
|
1642
|
+
},
|
|
1643
|
+
"azure_tts_subscription_key": {
|
|
1644
|
+
"type": "string",
|
|
1645
|
+
"description": "服务订阅密钥",
|
|
1646
|
+
"hint": "Azure_TTS 服务的订阅密钥(注意不是令牌)",
|
|
1647
|
+
},
|
|
1648
|
+
"dashscope_tts_voice": {"description": "音色", "type": "string"},
|
|
1649
|
+
"gm_resp_image_modal": {
|
|
1650
|
+
"description": "启用图片模态",
|
|
1651
|
+
"type": "bool",
|
|
1652
|
+
"hint": "启用后,将支持返回图片内容。需要模型支持,否则会报错。具体支持模型请查看 Google Gemini 官方网站。温馨提示,如果您需要生成图片,请关闭 `启用群员识别` 配置获得更好的效果。",
|
|
1653
|
+
},
|
|
1654
|
+
"gm_native_search": {
|
|
1655
|
+
"description": "启用原生搜索功能",
|
|
1656
|
+
"type": "bool",
|
|
1657
|
+
"hint": "启用后所有函数工具将全部失效,免费次数限制请查阅官方文档",
|
|
1658
|
+
},
|
|
1659
|
+
"gm_native_coderunner": {
|
|
1660
|
+
"description": "启用原生代码执行器",
|
|
1661
|
+
"type": "bool",
|
|
1662
|
+
"hint": "启用后所有函数工具将全部失效",
|
|
1663
|
+
},
|
|
1664
|
+
"gm_url_context": {
|
|
1665
|
+
"description": "启用URL上下文功能",
|
|
1666
|
+
"type": "bool",
|
|
1667
|
+
"hint": "启用后所有函数工具将全部失效",
|
|
1668
|
+
},
|
|
1669
|
+
"gm_safety_settings": {
|
|
1670
|
+
"description": "安全过滤器",
|
|
1671
|
+
"type": "object",
|
|
1672
|
+
"hint": "设置模型输入的内容安全过滤级别。过滤级别分类为NONE(不屏蔽)、HIGH(高风险时屏蔽)、MEDIUM_AND_ABOVE(中等风险及以上屏蔽)、LOW_AND_ABOVE(低风险及以上时屏蔽),具体参见Gemini API文档。",
|
|
1673
|
+
"items": {
|
|
1674
|
+
"harassment": {
|
|
1675
|
+
"description": "骚扰内容",
|
|
1676
|
+
"type": "string",
|
|
1677
|
+
"hint": "负面或有害评论",
|
|
1678
|
+
"options": [
|
|
1679
|
+
"BLOCK_NONE",
|
|
1680
|
+
"BLOCK_ONLY_HIGH",
|
|
1681
|
+
"BLOCK_MEDIUM_AND_ABOVE",
|
|
1682
|
+
"BLOCK_LOW_AND_ABOVE",
|
|
1683
|
+
],
|
|
1684
|
+
},
|
|
1685
|
+
"hate_speech": {
|
|
1686
|
+
"description": "仇恨言论",
|
|
774
1687
|
"type": "string",
|
|
775
1688
|
"hint": "粗鲁、无礼或亵渎性质内容",
|
|
776
1689
|
"options": [
|
|
@@ -815,6 +1728,98 @@ CONFIG_METADATA_2 = {
|
|
|
815
1728
|
},
|
|
816
1729
|
},
|
|
817
1730
|
},
|
|
1731
|
+
"minimax-group-id": {
|
|
1732
|
+
"type": "string",
|
|
1733
|
+
"description": "用户组",
|
|
1734
|
+
"hint": "于账户管理->基本信息中可见",
|
|
1735
|
+
},
|
|
1736
|
+
"minimax-langboost": {
|
|
1737
|
+
"type": "string",
|
|
1738
|
+
"description": "指定语言/方言",
|
|
1739
|
+
"hint": "增强对指定的小语种和方言的识别能力,设置后可以提升在指定小语种/方言场景下的语音表现",
|
|
1740
|
+
"options": [
|
|
1741
|
+
"Chinese",
|
|
1742
|
+
"Chinese,Yue",
|
|
1743
|
+
"English",
|
|
1744
|
+
"Arabic",
|
|
1745
|
+
"Russian",
|
|
1746
|
+
"Spanish",
|
|
1747
|
+
"French",
|
|
1748
|
+
"Portuguese",
|
|
1749
|
+
"German",
|
|
1750
|
+
"Turkish",
|
|
1751
|
+
"Dutch",
|
|
1752
|
+
"Ukrainian",
|
|
1753
|
+
"Vietnamese",
|
|
1754
|
+
"Indonesian",
|
|
1755
|
+
"Japanese",
|
|
1756
|
+
"Italian",
|
|
1757
|
+
"Korean",
|
|
1758
|
+
"Thai",
|
|
1759
|
+
"Polish",
|
|
1760
|
+
"Romanian",
|
|
1761
|
+
"Greek",
|
|
1762
|
+
"Czech",
|
|
1763
|
+
"Finnish",
|
|
1764
|
+
"Hindi",
|
|
1765
|
+
"auto",
|
|
1766
|
+
],
|
|
1767
|
+
},
|
|
1768
|
+
"minimax-voice-speed": {
|
|
1769
|
+
"type": "float",
|
|
1770
|
+
"description": "语速",
|
|
1771
|
+
"hint": "生成声音的语速, 取值[0.5, 2], 默认为1.0, 取值越大,语速越快",
|
|
1772
|
+
},
|
|
1773
|
+
"minimax-voice-vol": {
|
|
1774
|
+
"type": "float",
|
|
1775
|
+
"description": "音量",
|
|
1776
|
+
"hint": "生成声音的音量, 取值(0, 10], 默认为1.0, 取值越大,音量越高",
|
|
1777
|
+
},
|
|
1778
|
+
"minimax-voice-pitch": {
|
|
1779
|
+
"type": "int",
|
|
1780
|
+
"description": "语调",
|
|
1781
|
+
"hint": "生成声音的语调, 取值[-12, 12], 默认为0",
|
|
1782
|
+
},
|
|
1783
|
+
"minimax-is-timber-weight": {
|
|
1784
|
+
"type": "bool",
|
|
1785
|
+
"description": "启用混合音色",
|
|
1786
|
+
"hint": "启用混合音色, 支持以自定义权重混合最多四种音色, 启用后自动忽略单一音色设置",
|
|
1787
|
+
},
|
|
1788
|
+
"minimax-timber-weight": {
|
|
1789
|
+
"type": "string",
|
|
1790
|
+
"description": "混合音色",
|
|
1791
|
+
"editor_mode": True,
|
|
1792
|
+
"hint": "混合音色及其权重, 最多支持四种音色, 权重为整数, 取值[1, 100]. 可在官网API语音调试台预览代码获得预设以及编写模板, 需要严格按照json字符串格式编写, 可以查看控制台判断是否解析成功. 具体结构可参照默认值以及官网代码预览.",
|
|
1793
|
+
},
|
|
1794
|
+
"minimax-voice-id": {
|
|
1795
|
+
"type": "string",
|
|
1796
|
+
"description": "单一音色",
|
|
1797
|
+
"hint": "单一音色编号, 详见官网文档",
|
|
1798
|
+
},
|
|
1799
|
+
"minimax-voice-emotion": {
|
|
1800
|
+
"type": "string",
|
|
1801
|
+
"description": "情绪",
|
|
1802
|
+
"hint": "控制合成语音的情绪",
|
|
1803
|
+
"options": [
|
|
1804
|
+
"happy",
|
|
1805
|
+
"sad",
|
|
1806
|
+
"angry",
|
|
1807
|
+
"fearful",
|
|
1808
|
+
"disgusted",
|
|
1809
|
+
"surprised",
|
|
1810
|
+
"neutral",
|
|
1811
|
+
],
|
|
1812
|
+
},
|
|
1813
|
+
"minimax-voice-latex": {
|
|
1814
|
+
"type": "bool",
|
|
1815
|
+
"description": "支持朗读latex公式",
|
|
1816
|
+
"hint": "朗读latex公式, 但是需要确保输入文本按官网要求格式化",
|
|
1817
|
+
},
|
|
1818
|
+
"minimax-voice-english-normalization": {
|
|
1819
|
+
"type": "bool",
|
|
1820
|
+
"description": "支持英语文本规范化",
|
|
1821
|
+
"hint": "可提升数字阅读场景的性能,但会略微增加延迟",
|
|
1822
|
+
},
|
|
818
1823
|
"rag_options": {
|
|
819
1824
|
"description": "RAG 选项",
|
|
820
1825
|
"type": "object",
|
|
@@ -843,7 +1848,6 @@ CONFIG_METADATA_2 = {
|
|
|
843
1848
|
"description": "部署SenseVoice",
|
|
844
1849
|
"type": "string",
|
|
845
1850
|
"hint": "启用前请 pip 安装 funasr、funasr_onnx、torchaudio、torch、modelscope、jieba 库(默认使用CPU,大约下载 1 GB),并且安装 ffmpeg。否则将无法正常转文字。",
|
|
846
|
-
"obvious_hint": True,
|
|
847
1851
|
},
|
|
848
1852
|
"is_emotion": {
|
|
849
1853
|
"description": "情绪识别",
|
|
@@ -858,18 +1862,10 @@ CONFIG_METADATA_2 = {
|
|
|
858
1862
|
"variables": {
|
|
859
1863
|
"description": "工作流固定输入变量",
|
|
860
1864
|
"type": "object",
|
|
861
|
-
"obvious_hint": True,
|
|
862
1865
|
"items": {},
|
|
863
1866
|
"hint": "可选。工作流固定输入变量,将会作为工作流的输入。也可以在对话时使用 /set 指令动态设置变量。如果变量名冲突,优先使用动态设置的变量。",
|
|
864
1867
|
"invisible": True,
|
|
865
1868
|
},
|
|
866
|
-
# "fastgpt_app_type": {
|
|
867
|
-
# "description": "应用类型",
|
|
868
|
-
# "type": "string",
|
|
869
|
-
# "hint": "FastGPT 应用的应用类型。",
|
|
870
|
-
# "options": ["agent", "workflow", "plugin"],
|
|
871
|
-
# "obvious_hint": True,
|
|
872
|
-
# },
|
|
873
1869
|
"dashscope_app_type": {
|
|
874
1870
|
"description": "应用类型",
|
|
875
1871
|
"type": "string",
|
|
@@ -880,7 +1876,6 @@ CONFIG_METADATA_2 = {
|
|
|
880
1876
|
"dialog-workflow",
|
|
881
1877
|
"task-workflow",
|
|
882
1878
|
],
|
|
883
|
-
"obvious_hint": True,
|
|
884
1879
|
},
|
|
885
1880
|
"timeout": {
|
|
886
1881
|
"description": "超时时间",
|
|
@@ -890,82 +1885,61 @@ CONFIG_METADATA_2 = {
|
|
|
890
1885
|
"openai-tts-voice": {
|
|
891
1886
|
"description": "voice",
|
|
892
1887
|
"type": "string",
|
|
893
|
-
"obvious_hint": True,
|
|
894
1888
|
"hint": "OpenAI TTS 的声音。OpenAI 默认支持:'alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'",
|
|
895
1889
|
},
|
|
896
1890
|
"fishaudio-tts-character": {
|
|
897
1891
|
"description": "character",
|
|
898
1892
|
"type": "string",
|
|
899
|
-
"obvious_hint": True,
|
|
900
1893
|
"hint": "fishaudio TTS 的角色。默认为可莉。更多角色请访问:https://fish.audio/zh-CN/discovery",
|
|
901
1894
|
},
|
|
1895
|
+
"fishaudio-tts-reference-id": {
|
|
1896
|
+
"description": "reference_id",
|
|
1897
|
+
"type": "string",
|
|
1898
|
+
"hint": "fishaudio TTS 的参考模型ID(可选)。如果填入此字段,将直接使用模型ID而不通过角色名称查询。例如:626bb6d3f3364c9cbc3aa6a67300a664。更多模型请访问:https://fish.audio/zh-CN/discovery,进入模型详情界面后可复制模型ID",
|
|
1899
|
+
},
|
|
902
1900
|
"whisper_hint": {
|
|
903
1901
|
"description": "本地部署 Whisper 模型须知",
|
|
904
1902
|
"type": "string",
|
|
905
1903
|
"hint": "启用前请 pip 安装 openai-whisper 库(N卡用户大约下载 2GB,主要是 torch 和 cuda,CPU 用户大约下载 1 GB),并且安装 ffmpeg。否则将无法正常转文字。",
|
|
906
|
-
"obvious_hint": True,
|
|
907
1904
|
},
|
|
908
1905
|
"id": {
|
|
909
1906
|
"description": "ID",
|
|
910
1907
|
"type": "string",
|
|
911
|
-
"
|
|
912
|
-
"hint": "ID 不能和其它的服务提供商重复,否则将发生严重冲突。",
|
|
1908
|
+
"hint": "模型提供商名字。",
|
|
913
1909
|
},
|
|
914
1910
|
"type": {
|
|
915
|
-
"description": "
|
|
1911
|
+
"description": "模型提供商种类",
|
|
1912
|
+
"type": "string",
|
|
1913
|
+
"invisible": True,
|
|
1914
|
+
},
|
|
1915
|
+
"provider_type": {
|
|
1916
|
+
"description": "模型提供商能力种类",
|
|
916
1917
|
"type": "string",
|
|
917
1918
|
"invisible": True,
|
|
918
1919
|
},
|
|
919
1920
|
"enable": {
|
|
920
1921
|
"description": "启用",
|
|
921
1922
|
"type": "bool",
|
|
922
|
-
"hint": "是否启用该模型。未启用的模型将不会被使用。",
|
|
923
1923
|
},
|
|
924
1924
|
"key": {
|
|
925
1925
|
"description": "API Key",
|
|
926
1926
|
"type": "list",
|
|
927
1927
|
"items": {"type": "string"},
|
|
928
|
-
"hint": "
|
|
1928
|
+
"hint": "提供商 API Key。",
|
|
929
1929
|
},
|
|
930
1930
|
"api_base": {
|
|
931
1931
|
"description": "API Base URL",
|
|
932
1932
|
"type": "string",
|
|
933
|
-
"hint": "API Base URL
|
|
934
|
-
"obvious_hint": True,
|
|
935
|
-
},
|
|
936
|
-
"base_model_path": {
|
|
937
|
-
"description": "基座模型路径",
|
|
938
|
-
"type": "string",
|
|
939
|
-
"hint": "基座模型路径。",
|
|
940
|
-
},
|
|
941
|
-
"adapter_model_path": {
|
|
942
|
-
"description": "Adapter 模型路径",
|
|
943
|
-
"type": "string",
|
|
944
|
-
"hint": "Adapter 模型路径。如 Lora",
|
|
945
|
-
},
|
|
946
|
-
"llmtuner_template": {
|
|
947
|
-
"description": "template",
|
|
948
|
-
"type": "string",
|
|
949
|
-
"hint": "基座模型的类型。如 llama3, qwen, 请参考 LlamaFactory 文档。",
|
|
950
|
-
},
|
|
951
|
-
"finetuning_type": {
|
|
952
|
-
"description": "微调类型",
|
|
953
|
-
"type": "string",
|
|
954
|
-
"hint": "微调类型。如 `lora`",
|
|
955
|
-
},
|
|
956
|
-
"quantization_bit": {
|
|
957
|
-
"description": "量化位数",
|
|
958
|
-
"type": "int",
|
|
959
|
-
"hint": "量化位数。如 4",
|
|
1933
|
+
"hint": "API Base URL 请在模型提供商处获得。如出现 404 报错,尝试在地址末尾加上 /v1",
|
|
960
1934
|
},
|
|
961
1935
|
"model_config": {
|
|
962
|
-
"description": "
|
|
1936
|
+
"description": "模型配置",
|
|
963
1937
|
"type": "object",
|
|
964
1938
|
"items": {
|
|
965
1939
|
"model": {
|
|
966
1940
|
"description": "模型名称",
|
|
967
1941
|
"type": "string",
|
|
968
|
-
"hint": "
|
|
1942
|
+
"hint": "模型名称,如 gpt-4o-mini, deepseek-chat。",
|
|
969
1943
|
},
|
|
970
1944
|
"max_tokens": {
|
|
971
1945
|
"description": "模型最大输出长度(tokens)",
|
|
@@ -1002,225 +1976,158 @@ CONFIG_METADATA_2 = {
|
|
|
1002
1976
|
"hint": "发送的消息文本内容对应的输入变量名。默认为 astrbot_text_query。",
|
|
1003
1977
|
"obvious": True,
|
|
1004
1978
|
},
|
|
1979
|
+
"coze_api_key": {
|
|
1980
|
+
"description": "Coze API Key",
|
|
1981
|
+
"type": "string",
|
|
1982
|
+
"hint": "Coze API 密钥,用于访问 Coze 服务。",
|
|
1983
|
+
},
|
|
1984
|
+
"bot_id": {
|
|
1985
|
+
"description": "Bot ID",
|
|
1986
|
+
"type": "string",
|
|
1987
|
+
"hint": "Coze 机器人的 ID,在 Coze 平台上创建机器人后获得。",
|
|
1988
|
+
},
|
|
1989
|
+
"coze_api_base": {
|
|
1990
|
+
"description": "API Base URL",
|
|
1991
|
+
"type": "string",
|
|
1992
|
+
"hint": "Coze API 的基础 URL 地址,默认为 https://api.coze.cn",
|
|
1993
|
+
},
|
|
1994
|
+
"auto_save_history": {
|
|
1995
|
+
"description": "由 Coze 管理对话记录",
|
|
1996
|
+
"type": "bool",
|
|
1997
|
+
"hint": "启用后,将由 Coze 进行对话历史记录管理, 此时 AstrBot 本地保存的上下文不会生效(仅供浏览), 对 AstrBot 的上下文进行的操作也不会生效。如果为禁用, 则使用 AstrBot 管理上下文。",
|
|
1998
|
+
},
|
|
1005
1999
|
},
|
|
1006
2000
|
},
|
|
1007
2001
|
"provider_settings": {
|
|
1008
|
-
"description": "大语言模型设置",
|
|
1009
2002
|
"type": "object",
|
|
1010
2003
|
"items": {
|
|
1011
2004
|
"enable": {
|
|
1012
|
-
"description": "启用大语言模型聊天",
|
|
1013
2005
|
"type": "bool",
|
|
1014
|
-
|
|
1015
|
-
|
|
2006
|
+
},
|
|
2007
|
+
"default_provider_id": {
|
|
2008
|
+
"type": "string",
|
|
1016
2009
|
},
|
|
1017
2010
|
"wake_prefix": {
|
|
1018
|
-
"description": "LLM 聊天额外唤醒前缀",
|
|
1019
2011
|
"type": "string",
|
|
1020
|
-
"hint": "使用 LLM 聊天额外的触发条件。如填写 `chat`,则需要消息前缀加上 `/chat` 才能触发 LLM 聊天,是一个防止滥用的手段。",
|
|
1021
2012
|
},
|
|
1022
2013
|
"web_search": {
|
|
1023
|
-
"description": "启用网页搜索",
|
|
1024
2014
|
"type": "bool",
|
|
1025
|
-
"obvious_hint": True,
|
|
1026
|
-
"hint": "能访问 Google 时效果最佳(国内需要在 `其他配置` 开启 HTTP 代理)。如果 Google 访问失败,程序会依次访问 Bing, Sogo 搜索引擎。",
|
|
1027
2015
|
},
|
|
1028
2016
|
"web_search_link": {
|
|
1029
|
-
"description": "网页搜索引用链接",
|
|
1030
2017
|
"type": "bool",
|
|
1031
|
-
|
|
1032
|
-
|
|
2018
|
+
},
|
|
2019
|
+
"display_reasoning_text": {
|
|
2020
|
+
"type": "bool",
|
|
1033
2021
|
},
|
|
1034
2022
|
"identifier": {
|
|
1035
|
-
"description": "启动识别群员",
|
|
1036
2023
|
"type": "bool",
|
|
1037
|
-
|
|
1038
|
-
|
|
2024
|
+
},
|
|
2025
|
+
"group_name_display": {
|
|
2026
|
+
"type": "bool",
|
|
1039
2027
|
},
|
|
1040
2028
|
"datetime_system_prompt": {
|
|
1041
|
-
"description": "启用日期时间系统提示",
|
|
1042
2029
|
"type": "bool",
|
|
1043
|
-
"obvious_hint": True,
|
|
1044
|
-
"hint": "启用后,会在系统提示词中加上当前机器的日期时间。",
|
|
1045
2030
|
},
|
|
1046
2031
|
"default_personality": {
|
|
1047
|
-
"description": "默认采用的人格情景的名称",
|
|
1048
2032
|
"type": "string",
|
|
1049
|
-
"hint": "",
|
|
1050
2033
|
},
|
|
1051
2034
|
"prompt_prefix": {
|
|
1052
|
-
"description": "Prompt 前缀文本",
|
|
1053
2035
|
"type": "string",
|
|
1054
|
-
"hint": "添加之后,会在每次对话的 Prompt 前加上此文本。",
|
|
1055
2036
|
},
|
|
1056
2037
|
"max_context_length": {
|
|
1057
|
-
"description": "最多携带对话数量(条)",
|
|
1058
2038
|
"type": "int",
|
|
1059
|
-
"hint": "超出这个数量时将丢弃最旧的部分,用户和AI的一轮聊天记为 1 条。-1 表示不限制,默认为不限制。",
|
|
1060
2039
|
},
|
|
1061
2040
|
"dequeue_context_length": {
|
|
1062
|
-
"description": "丢弃对话数量(条)",
|
|
1063
2041
|
"type": "int",
|
|
1064
|
-
"hint": "超出 最多携带对话数量(条) 时,丢弃多少条记录,用户和AI的一轮聊天记为 1 条。适宜的配置,可以提高超长上下文对话 deepseek 命中缓存效果,理想情况下计费将降低到1/3以下",
|
|
1065
2042
|
},
|
|
1066
2043
|
"streaming_response": {
|
|
1067
|
-
"description": "启用流式回复",
|
|
1068
2044
|
"type": "bool",
|
|
1069
|
-
"hint": "启用后,将会流式输出 LLM 的响应。目前仅支持 OpenAI API提供商 以及 Telegram、QQ Official 私聊 两个平台",
|
|
1070
2045
|
},
|
|
1071
|
-
"
|
|
1072
|
-
"description": "不支持流式回复的平台分段输出",
|
|
2046
|
+
"show_tool_use_status": {
|
|
1073
2047
|
"type": "bool",
|
|
1074
|
-
"hint": "启用后,若平台不支持流式回复,会分段输出。目前仅支持 aiocqhttp 和 gewechat 两个平台,不支持或无需使用流式分段输出的平台会静默忽略此选项",
|
|
1075
2048
|
},
|
|
1076
|
-
|
|
1077
|
-
},
|
|
1078
|
-
"persona": {
|
|
1079
|
-
"description": "人格情景设置",
|
|
1080
|
-
"type": "list",
|
|
1081
|
-
"config_template": {
|
|
1082
|
-
"新人格情景": {
|
|
1083
|
-
"name": "",
|
|
1084
|
-
"prompt": "",
|
|
1085
|
-
"begin_dialogs": [],
|
|
1086
|
-
"mood_imitation_dialogs": [],
|
|
1087
|
-
}
|
|
1088
|
-
},
|
|
1089
|
-
"tmpl_display_title": "name",
|
|
1090
|
-
"items": {
|
|
1091
|
-
"name": {
|
|
1092
|
-
"description": "人格名称",
|
|
2049
|
+
"unsupported_streaming_strategy": {
|
|
1093
2050
|
"type": "string",
|
|
1094
|
-
"hint": "人格名称,用于在多个人格中区分。使用 /persona 指令可切换人格。在 大语言模型设置 处可以设置默认人格。",
|
|
1095
|
-
"obvious_hint": True,
|
|
1096
2051
|
},
|
|
1097
|
-
"
|
|
1098
|
-
"
|
|
1099
|
-
"type": "text",
|
|
1100
|
-
"hint": "填写人格的身份背景、性格特征、兴趣爱好、个人经历、口头禅等。",
|
|
2052
|
+
"agent_runner_type": {
|
|
2053
|
+
"type": "string",
|
|
1101
2054
|
},
|
|
1102
|
-
"
|
|
1103
|
-
"
|
|
1104
|
-
"type": "list",
|
|
1105
|
-
"items": {"type": "string"},
|
|
1106
|
-
"hint": "可选。在每个对话前会插入这些预设对话。对话需要成对(用户和助手),输入完一个角色的内容之后按【回车】。需要偶数个对话",
|
|
1107
|
-
"obvious_hint": True,
|
|
2055
|
+
"dify_agent_runner_provider_id": {
|
|
2056
|
+
"type": "string",
|
|
1108
2057
|
},
|
|
1109
|
-
"
|
|
1110
|
-
"
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
"
|
|
1114
|
-
|
|
2058
|
+
"coze_agent_runner_provider_id": {
|
|
2059
|
+
"type": "string",
|
|
2060
|
+
},
|
|
2061
|
+
"dashscope_agent_runner_provider_id": {
|
|
2062
|
+
"type": "string",
|
|
2063
|
+
},
|
|
2064
|
+
"max_agent_step": {
|
|
2065
|
+
"type": "int",
|
|
2066
|
+
},
|
|
2067
|
+
"tool_call_timeout": {
|
|
2068
|
+
"type": "int",
|
|
1115
2069
|
},
|
|
1116
2070
|
},
|
|
1117
2071
|
},
|
|
1118
2072
|
"provider_stt_settings": {
|
|
1119
|
-
"description": "语音转文本(STT)",
|
|
1120
2073
|
"type": "object",
|
|
1121
2074
|
"items": {
|
|
1122
2075
|
"enable": {
|
|
1123
|
-
"description": "启用语音转文本(STT)",
|
|
1124
2076
|
"type": "bool",
|
|
1125
|
-
"hint": "启用前请在 服务提供商配置 处创建支持 语音转文本任务 的提供商。如 whisper。",
|
|
1126
|
-
"obvious_hint": True,
|
|
1127
2077
|
},
|
|
1128
2078
|
"provider_id": {
|
|
1129
|
-
"description": "提供商 ID,不填则默认第一个STT提供商",
|
|
1130
2079
|
"type": "string",
|
|
1131
|
-
"hint": "语音转文本提供商 ID。如果不填写将使用载入的第一个提供商。",
|
|
1132
2080
|
},
|
|
1133
2081
|
},
|
|
1134
2082
|
},
|
|
1135
2083
|
"provider_tts_settings": {
|
|
1136
|
-
"description": "文本转语音(TTS)",
|
|
1137
2084
|
"type": "object",
|
|
1138
2085
|
"items": {
|
|
1139
2086
|
"enable": {
|
|
1140
|
-
"description": "启用文本转语音(TTS)",
|
|
1141
2087
|
"type": "bool",
|
|
1142
|
-
"hint": "启用前请在 服务提供商配置 处创建支持 语音转文本任务 的提供商。如 openai_tts。",
|
|
1143
|
-
"obvious_hint": True,
|
|
1144
2088
|
},
|
|
1145
2089
|
"provider_id": {
|
|
1146
|
-
"description": "提供商 ID,不填则默认第一个TTS提供商",
|
|
1147
2090
|
"type": "string",
|
|
1148
|
-
"hint": "文本转语音提供商 ID。如果不填写将使用载入的第一个提供商。",
|
|
1149
2091
|
},
|
|
1150
2092
|
"dual_output": {
|
|
1151
|
-
"description": "启用语音和文字双输出",
|
|
1152
2093
|
"type": "bool",
|
|
1153
|
-
|
|
1154
|
-
|
|
2094
|
+
},
|
|
2095
|
+
"use_file_service": {
|
|
2096
|
+
"type": "bool",
|
|
1155
2097
|
},
|
|
1156
2098
|
},
|
|
1157
2099
|
},
|
|
1158
2100
|
"provider_ltm_settings": {
|
|
1159
|
-
"description": "聊天记忆增强(Beta)",
|
|
1160
2101
|
"type": "object",
|
|
1161
2102
|
"items": {
|
|
1162
2103
|
"group_icl_enable": {
|
|
1163
|
-
"description": "群聊内记录各群员对话",
|
|
1164
2104
|
"type": "bool",
|
|
1165
|
-
"obvious_hint": True,
|
|
1166
|
-
"hint": "启用后,会记录群聊内各群员的对话。使用 /reset 命令清除记录。推荐使用 gpt-4o-mini 模型。",
|
|
1167
2105
|
},
|
|
1168
2106
|
"group_message_max_cnt": {
|
|
1169
|
-
"description": "群聊消息最大数量",
|
|
1170
2107
|
"type": "int",
|
|
1171
|
-
"obvious_hint": True,
|
|
1172
|
-
"hint": "群聊消息最大数量。超过此数量后,会自动清除旧消息。",
|
|
1173
2108
|
},
|
|
1174
2109
|
"image_caption": {
|
|
1175
|
-
"description": "群聊图像转述(需模型支持)",
|
|
1176
2110
|
"type": "bool",
|
|
1177
|
-
"obvious_hint": True,
|
|
1178
|
-
"hint": "用模型将群聊中的图片消息转述为文字,推荐 gpt-4o-mini 模型。和机器人的唤醒聊天中的图片消息仍然会直接作为上下文输入。",
|
|
1179
|
-
},
|
|
1180
|
-
"image_caption_provider_id": {
|
|
1181
|
-
"description": "图像转述提供商 ID",
|
|
1182
|
-
"type": "string",
|
|
1183
|
-
"obvious_hint": True,
|
|
1184
|
-
"hint": "可选。图像转述提供商 ID。如为空将选择聊天使用的提供商。",
|
|
1185
2111
|
},
|
|
1186
2112
|
"image_caption_prompt": {
|
|
1187
|
-
"description": "图像转述提示词",
|
|
1188
2113
|
"type": "string",
|
|
1189
2114
|
},
|
|
1190
2115
|
"active_reply": {
|
|
1191
|
-
"description": "主动回复",
|
|
1192
2116
|
"type": "object",
|
|
1193
2117
|
"items": {
|
|
1194
2118
|
"enable": {
|
|
1195
|
-
"description": "启用主动回复",
|
|
1196
2119
|
"type": "bool",
|
|
1197
|
-
"obvious_hint": True,
|
|
1198
|
-
"hint": "启用后,会根据触发概率主动回复群聊内的对话。QQ官方API(qq_official)不可用",
|
|
1199
2120
|
},
|
|
1200
2121
|
"whitelist": {
|
|
1201
|
-
"description": "主动回复白名单",
|
|
1202
2122
|
"type": "list",
|
|
1203
2123
|
"items": {"type": "string"},
|
|
1204
|
-
"obvious_hint": True,
|
|
1205
|
-
"hint": "启用后,只有在白名单内的群聊会被主动回复。为空时不启用白名单过滤。需要通过 /sid 获取 SID 添加到这里。",
|
|
1206
2124
|
},
|
|
1207
2125
|
"method": {
|
|
1208
|
-
"description": "回复方法",
|
|
1209
2126
|
"type": "string",
|
|
1210
2127
|
"options": ["possibility_reply"],
|
|
1211
|
-
"hint": "回复方法。possibility_reply 为根据概率回复",
|
|
1212
2128
|
},
|
|
1213
2129
|
"possibility_reply": {
|
|
1214
|
-
"description": "回复概率",
|
|
1215
2130
|
"type": "float",
|
|
1216
|
-
"obvious_hint": True,
|
|
1217
|
-
"hint": "回复概率。当回复方法为 possibility_reply 时有效。当概率 >= 1 时,每条消息都会回复。",
|
|
1218
|
-
},
|
|
1219
|
-
"prompt": {
|
|
1220
|
-
"description": "提示词",
|
|
1221
|
-
"type": "string",
|
|
1222
|
-
"obvious_hint": True,
|
|
1223
|
-
"hint": "提示词。当提示词为空时,如果触发回复,则向 LLM 请求的是触发的消息的内容;否则是提示词。此项可以和定时回复(暂未实现)配合使用。",
|
|
1224
2131
|
},
|
|
1225
2132
|
},
|
|
1226
2133
|
},
|
|
@@ -1229,166 +2136,778 @@ CONFIG_METADATA_2 = {
|
|
|
1229
2136
|
},
|
|
1230
2137
|
},
|
|
1231
2138
|
"misc_config_group": {
|
|
1232
|
-
"name": "其他配置",
|
|
1233
2139
|
"metadata": {
|
|
1234
2140
|
"wake_prefix": {
|
|
1235
|
-
"description": "机器人唤醒前缀",
|
|
1236
2141
|
"type": "list",
|
|
1237
2142
|
"items": {"type": "string"},
|
|
1238
|
-
"obvious_hint": True,
|
|
1239
|
-
"hint": "在不 @ 机器人的情况下,可以通过外加消息前缀来唤醒机器人。更改此配置将影响整个 Bot 的功能唤醒,包括所有指令。如果您不保留 `/`,则内置指令(help等)将需要通过您的唤醒前缀来触发。",
|
|
1240
2143
|
},
|
|
1241
2144
|
"t2i": {
|
|
1242
|
-
"description": "文本转图像",
|
|
1243
2145
|
"type": "bool",
|
|
1244
|
-
"hint": "启用后,超出一定长度的文本将会通过 AstrBot API 渲染成 Markdown 图片发送。可以缓解审核和消息过长刷屏的问题,并提高 Markdown 文本的可读性。",
|
|
1245
2146
|
},
|
|
1246
2147
|
"t2i_word_threshold": {
|
|
1247
|
-
"description": "文本转图像字数阈值",
|
|
1248
2148
|
"type": "int",
|
|
1249
|
-
"hint": "超出此字符长度的文本将会被转换成图片。字数不能低于 50。",
|
|
1250
2149
|
},
|
|
1251
2150
|
"admins_id": {
|
|
1252
|
-
"description": "管理员 ID",
|
|
1253
2151
|
"type": "list",
|
|
1254
2152
|
"items": {"type": "string"},
|
|
1255
|
-
"hint": "管理员 ID 列表,管理员可以使用一些特权命令,如 `update`, `plugin` 等。ID 可以通过 `/sid` 指令获得。回车添加,可添加多个。",
|
|
1256
2153
|
},
|
|
1257
2154
|
"http_proxy": {
|
|
1258
|
-
"description": "HTTP 代理",
|
|
1259
2155
|
"type": "string",
|
|
1260
|
-
|
|
2156
|
+
},
|
|
2157
|
+
"no_proxy": {
|
|
2158
|
+
"description": "直连地址列表",
|
|
2159
|
+
"type": "list",
|
|
2160
|
+
"items": {"type": "string"},
|
|
2161
|
+
"hint": "在此处添加不希望通过代理访问的地址,例如内部服务地址。回车添加,可添加多个,如未设置代理请忽略此配置",
|
|
1261
2162
|
},
|
|
1262
2163
|
"timezone": {
|
|
1263
|
-
"description": "时区",
|
|
1264
2164
|
"type": "string",
|
|
1265
|
-
|
|
1266
|
-
|
|
2165
|
+
},
|
|
2166
|
+
"callback_api_base": {
|
|
2167
|
+
"type": "string",
|
|
1267
2168
|
},
|
|
1268
2169
|
"log_level": {
|
|
1269
|
-
"description": "控制台日志级别",
|
|
1270
2170
|
"type": "string",
|
|
1271
|
-
"hint": "控制台输出日志的级别。",
|
|
1272
2171
|
"options": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
|
1273
2172
|
},
|
|
1274
2173
|
"t2i_strategy": {
|
|
1275
|
-
"description": "文本转图像渲染源",
|
|
1276
2174
|
"type": "string",
|
|
1277
|
-
"hint": "文本转图像策略。`remote` 为使用远程基于 HTML 的渲染服务,`local` 为使用 PIL 本地渲染。当使用 local 时,将 ttf 字体命名为 'font.ttf' 放在 data/ 目录下可自定义字体。",
|
|
1278
2175
|
"options": ["remote", "local"],
|
|
1279
2176
|
},
|
|
1280
2177
|
"t2i_endpoint": {
|
|
1281
|
-
"description": "文本转图像服务接口",
|
|
1282
2178
|
"type": "string",
|
|
1283
|
-
|
|
2179
|
+
},
|
|
2180
|
+
"t2i_use_file_service": {
|
|
2181
|
+
"type": "bool",
|
|
1284
2182
|
},
|
|
1285
2183
|
"pip_install_arg": {
|
|
1286
|
-
"description": "pip 安装参数",
|
|
1287
2184
|
"type": "string",
|
|
1288
|
-
"hint": "安装插件依赖时,会使用 Python 的 pip 工具。这里可以填写额外的参数,如 `--break-system-package` 等。",
|
|
1289
2185
|
},
|
|
1290
2186
|
"pypi_index_url": {
|
|
1291
|
-
"description": "PyPI 软件仓库地址",
|
|
1292
2187
|
"type": "string",
|
|
1293
|
-
"hint": "安装 Python 依赖时请求的 PyPI 软件仓库地址。默认为 https://mirrors.aliyun.com/pypi/simple/",
|
|
1294
2188
|
},
|
|
2189
|
+
"default_kb_collection": {
|
|
2190
|
+
"type": "string",
|
|
2191
|
+
},
|
|
2192
|
+
"kb_names": {"type": "list", "items": {"type": "string"}},
|
|
2193
|
+
"kb_fusion_top_k": {"type": "int", "default": 20},
|
|
2194
|
+
"kb_final_top_k": {"type": "int", "default": 5},
|
|
2195
|
+
"kb_agentic_mode": {"type": "bool"},
|
|
1295
2196
|
},
|
|
1296
2197
|
},
|
|
1297
2198
|
}
|
|
1298
2199
|
|
|
1299
|
-
DEFAULT_VALUE_MAP = {
|
|
1300
|
-
"int": 0,
|
|
1301
|
-
"float": 0.0,
|
|
1302
|
-
"bool": False,
|
|
1303
|
-
"string": "",
|
|
1304
|
-
"text": "",
|
|
1305
|
-
"list": [],
|
|
1306
|
-
"object": {},
|
|
1307
|
-
}
|
|
1308
2200
|
|
|
2201
|
+
"""
|
|
2202
|
+
v4.7.0 之后,name, description, hint 等字段已经实现 i18n 国际化。国际化资源文件位于:
|
|
2203
|
+
|
|
2204
|
+
- dashboard/src/i18n/locales/en-US/features/config-metadata.json
|
|
2205
|
+
- dashboard/src/i18n/locales/zh-CN/features/config-metadata.json
|
|
1309
2206
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
2207
|
+
如果在此文件中添加了新的配置字段,请务必同步更新上述两个国际化资源文件。
|
|
2208
|
+
"""
|
|
2209
|
+
CONFIG_METADATA_3 = {
|
|
2210
|
+
"ai_group": {
|
|
2211
|
+
"name": "AI 配置",
|
|
2212
|
+
"metadata": {
|
|
2213
|
+
"agent_runner": {
|
|
2214
|
+
"description": "Agent 执行方式",
|
|
2215
|
+
"hint": "选择 AI 对话的执行器,默认为 AstrBot 内置 Agent 执行器,可使用 AstrBot 内的知识库、人格、工具调用功能。如果不打算接入 Dify 或 Coze 等第三方 Agent 执行器,不需要修改此节。",
|
|
2216
|
+
"type": "object",
|
|
2217
|
+
"items": {
|
|
2218
|
+
"provider_settings.enable": {
|
|
2219
|
+
"description": "启用",
|
|
2220
|
+
"type": "bool",
|
|
2221
|
+
"hint": "AI 对话总开关",
|
|
2222
|
+
},
|
|
2223
|
+
"provider_settings.agent_runner_type": {
|
|
2224
|
+
"description": "执行器",
|
|
2225
|
+
"type": "string",
|
|
2226
|
+
"options": ["local", "dify", "coze", "dashscope"],
|
|
2227
|
+
"labels": ["内置 Agent", "Dify", "Coze", "阿里云百炼应用"],
|
|
2228
|
+
"condition": {
|
|
2229
|
+
"provider_settings.enable": True,
|
|
2230
|
+
},
|
|
2231
|
+
},
|
|
2232
|
+
"provider_settings.coze_agent_runner_provider_id": {
|
|
2233
|
+
"description": "Coze Agent 执行器提供商 ID",
|
|
2234
|
+
"type": "string",
|
|
2235
|
+
"_special": "select_agent_runner_provider:coze",
|
|
2236
|
+
"condition": {
|
|
2237
|
+
"provider_settings.agent_runner_type": "coze",
|
|
2238
|
+
"provider_settings.enable": True,
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
2241
|
+
"provider_settings.dify_agent_runner_provider_id": {
|
|
2242
|
+
"description": "Dify Agent 执行器提供商 ID",
|
|
2243
|
+
"type": "string",
|
|
2244
|
+
"_special": "select_agent_runner_provider:dify",
|
|
2245
|
+
"condition": {
|
|
2246
|
+
"provider_settings.agent_runner_type": "dify",
|
|
2247
|
+
"provider_settings.enable": True,
|
|
2248
|
+
},
|
|
2249
|
+
},
|
|
2250
|
+
"provider_settings.dashscope_agent_runner_provider_id": {
|
|
2251
|
+
"description": "阿里云百炼应用 Agent 执行器提供商 ID",
|
|
2252
|
+
"type": "string",
|
|
2253
|
+
"_special": "select_agent_runner_provider:dashscope",
|
|
2254
|
+
"condition": {
|
|
2255
|
+
"provider_settings.agent_runner_type": "dashscope",
|
|
2256
|
+
"provider_settings.enable": True,
|
|
2257
|
+
},
|
|
2258
|
+
},
|
|
2259
|
+
},
|
|
2260
|
+
},
|
|
2261
|
+
"ai": {
|
|
2262
|
+
"description": "模型",
|
|
2263
|
+
"hint": "当使用非内置 Agent 执行器时,默认聊天模型和默认图片转述模型可能会无效,但某些插件会依赖此配置项来调用 AI 能力。",
|
|
2264
|
+
"type": "object",
|
|
2265
|
+
"items": {
|
|
2266
|
+
"provider_settings.default_provider_id": {
|
|
2267
|
+
"description": "默认聊天模型",
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"_special": "select_provider",
|
|
2270
|
+
"hint": "留空时使用第一个模型",
|
|
2271
|
+
},
|
|
2272
|
+
"provider_settings.default_image_caption_provider_id": {
|
|
2273
|
+
"description": "默认图片转述模型",
|
|
2274
|
+
"type": "string",
|
|
2275
|
+
"_special": "select_provider",
|
|
2276
|
+
"hint": "留空代表不使用,可用于非多模态模型",
|
|
2277
|
+
},
|
|
2278
|
+
"provider_stt_settings.enable": {
|
|
2279
|
+
"description": "启用语音转文本",
|
|
2280
|
+
"type": "bool",
|
|
2281
|
+
"hint": "STT 总开关",
|
|
2282
|
+
},
|
|
2283
|
+
"provider_stt_settings.provider_id": {
|
|
2284
|
+
"description": "默认语音转文本模型",
|
|
2285
|
+
"type": "string",
|
|
2286
|
+
"hint": "用户也可使用 /provider 指令单独选择会话的 STT 模型。",
|
|
2287
|
+
"_special": "select_provider_stt",
|
|
2288
|
+
"condition": {
|
|
2289
|
+
"provider_stt_settings.enable": True,
|
|
2290
|
+
},
|
|
2291
|
+
},
|
|
2292
|
+
"provider_tts_settings.enable": {
|
|
2293
|
+
"description": "启用文本转语音",
|
|
2294
|
+
"type": "bool",
|
|
2295
|
+
"hint": "TTS 总开关",
|
|
2296
|
+
},
|
|
2297
|
+
"provider_tts_settings.provider_id": {
|
|
2298
|
+
"description": "默认文本转语音模型",
|
|
2299
|
+
"type": "string",
|
|
2300
|
+
"_special": "select_provider_tts",
|
|
2301
|
+
"condition": {
|
|
2302
|
+
"provider_tts_settings.enable": True,
|
|
2303
|
+
},
|
|
2304
|
+
},
|
|
2305
|
+
"provider_settings.image_caption_prompt": {
|
|
2306
|
+
"description": "图片转述提示词",
|
|
2307
|
+
"type": "text",
|
|
2308
|
+
},
|
|
2309
|
+
},
|
|
2310
|
+
"condition": {
|
|
2311
|
+
"provider_settings.enable": True,
|
|
2312
|
+
},
|
|
2313
|
+
},
|
|
2314
|
+
"persona": {
|
|
2315
|
+
"description": "人格",
|
|
2316
|
+
"type": "object",
|
|
2317
|
+
"items": {
|
|
2318
|
+
"provider_settings.default_personality": {
|
|
2319
|
+
"description": "默认采用的人格",
|
|
2320
|
+
"type": "string",
|
|
2321
|
+
"_special": "select_persona",
|
|
2322
|
+
},
|
|
2323
|
+
},
|
|
2324
|
+
"condition": {
|
|
2325
|
+
"provider_settings.agent_runner_type": "local",
|
|
2326
|
+
"provider_settings.enable": True,
|
|
2327
|
+
},
|
|
2328
|
+
},
|
|
2329
|
+
"knowledgebase": {
|
|
2330
|
+
"description": "知识库",
|
|
2331
|
+
"type": "object",
|
|
2332
|
+
"items": {
|
|
2333
|
+
"kb_names": {
|
|
2334
|
+
"description": "知识库列表",
|
|
2335
|
+
"type": "list",
|
|
2336
|
+
"items": {"type": "string"},
|
|
2337
|
+
"_special": "select_knowledgebase",
|
|
2338
|
+
"hint": "支持多选",
|
|
2339
|
+
},
|
|
2340
|
+
"kb_fusion_top_k": {
|
|
2341
|
+
"description": "融合检索结果数",
|
|
2342
|
+
"type": "int",
|
|
2343
|
+
"hint": "多个知识库检索结果融合后的返回结果数量",
|
|
2344
|
+
},
|
|
2345
|
+
"kb_final_top_k": {
|
|
2346
|
+
"description": "最终返回结果数",
|
|
2347
|
+
"type": "int",
|
|
2348
|
+
"hint": "从知识库中检索到的结果数量,越大可能获得越多相关信息,但也可能引入噪音。建议根据实际需求调整",
|
|
2349
|
+
},
|
|
2350
|
+
"kb_agentic_mode": {
|
|
2351
|
+
"description": "Agentic 知识库检索",
|
|
2352
|
+
"type": "bool",
|
|
2353
|
+
"hint": "启用后,知识库检索将作为 LLM Tool,由模型自主决定何时调用知识库进行查询。需要模型支持函数调用能力。",
|
|
2354
|
+
},
|
|
2355
|
+
},
|
|
2356
|
+
"condition": {
|
|
2357
|
+
"provider_settings.agent_runner_type": "local",
|
|
2358
|
+
"provider_settings.enable": True,
|
|
2359
|
+
},
|
|
2360
|
+
},
|
|
2361
|
+
"websearch": {
|
|
2362
|
+
"description": "网页搜索",
|
|
2363
|
+
"type": "object",
|
|
2364
|
+
"items": {
|
|
2365
|
+
"provider_settings.web_search": {
|
|
2366
|
+
"description": "启用网页搜索",
|
|
2367
|
+
"type": "bool",
|
|
2368
|
+
},
|
|
2369
|
+
"provider_settings.websearch_provider": {
|
|
2370
|
+
"description": "网页搜索提供商",
|
|
2371
|
+
"type": "string",
|
|
2372
|
+
"options": ["default", "tavily", "baidu_ai_search"],
|
|
2373
|
+
},
|
|
2374
|
+
"provider_settings.websearch_tavily_key": {
|
|
2375
|
+
"description": "Tavily API Key",
|
|
2376
|
+
"type": "list",
|
|
2377
|
+
"items": {"type": "string"},
|
|
2378
|
+
"hint": "可添加多个 Key 进行轮询。",
|
|
2379
|
+
"condition": {
|
|
2380
|
+
"provider_settings.websearch_provider": "tavily",
|
|
2381
|
+
},
|
|
2382
|
+
},
|
|
2383
|
+
"provider_settings.websearch_baidu_app_builder_key": {
|
|
2384
|
+
"description": "百度千帆智能云 APP Builder API Key",
|
|
2385
|
+
"type": "string",
|
|
2386
|
+
"hint": "参考:https://console.bce.baidu.com/iam/#/iam/apikey/list",
|
|
2387
|
+
"condition": {
|
|
2388
|
+
"provider_settings.websearch_provider": "baidu_ai_search",
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
"provider_settings.web_search_link": {
|
|
2392
|
+
"description": "显示来源引用",
|
|
2393
|
+
"type": "bool",
|
|
2394
|
+
},
|
|
2395
|
+
},
|
|
2396
|
+
"condition": {
|
|
2397
|
+
"provider_settings.agent_runner_type": "local",
|
|
2398
|
+
"provider_settings.enable": True,
|
|
2399
|
+
},
|
|
2400
|
+
},
|
|
2401
|
+
"others": {
|
|
2402
|
+
"description": "其他配置",
|
|
2403
|
+
"type": "object",
|
|
2404
|
+
"items": {
|
|
2405
|
+
"provider_settings.display_reasoning_text": {
|
|
2406
|
+
"description": "显示思考内容",
|
|
2407
|
+
"type": "bool",
|
|
2408
|
+
"condition": {
|
|
2409
|
+
"provider_settings.agent_runner_type": "local",
|
|
2410
|
+
},
|
|
2411
|
+
},
|
|
2412
|
+
"provider_settings.identifier": {
|
|
2413
|
+
"description": "用户识别",
|
|
2414
|
+
"type": "bool",
|
|
2415
|
+
"hint": "启用后,会在提示词前包含用户 ID 信息。",
|
|
2416
|
+
},
|
|
2417
|
+
"provider_settings.group_name_display": {
|
|
2418
|
+
"description": "显示群名称",
|
|
2419
|
+
"type": "bool",
|
|
2420
|
+
"hint": "启用后,在支持的平台(OneBot v11)上会在提示词前包含群名称信息。",
|
|
2421
|
+
},
|
|
2422
|
+
"provider_settings.datetime_system_prompt": {
|
|
2423
|
+
"description": "现实世界时间感知",
|
|
2424
|
+
"type": "bool",
|
|
2425
|
+
"hint": "启用后,会在系统提示词中附带当前时间信息。",
|
|
2426
|
+
"condition": {
|
|
2427
|
+
"provider_settings.agent_runner_type": "local",
|
|
2428
|
+
},
|
|
2429
|
+
},
|
|
2430
|
+
"provider_settings.show_tool_use_status": {
|
|
2431
|
+
"description": "输出函数调用状态",
|
|
2432
|
+
"type": "bool",
|
|
2433
|
+
"condition": {
|
|
2434
|
+
"provider_settings.agent_runner_type": "local",
|
|
2435
|
+
},
|
|
2436
|
+
},
|
|
2437
|
+
"provider_settings.max_agent_step": {
|
|
2438
|
+
"description": "工具调用轮数上限",
|
|
2439
|
+
"type": "int",
|
|
2440
|
+
"condition": {
|
|
2441
|
+
"provider_settings.agent_runner_type": "local",
|
|
2442
|
+
},
|
|
2443
|
+
},
|
|
2444
|
+
"provider_settings.tool_call_timeout": {
|
|
2445
|
+
"description": "工具调用超时时间(秒)",
|
|
2446
|
+
"type": "int",
|
|
2447
|
+
"condition": {
|
|
2448
|
+
"provider_settings.agent_runner_type": "local",
|
|
2449
|
+
},
|
|
2450
|
+
},
|
|
2451
|
+
"provider_settings.streaming_response": {
|
|
2452
|
+
"description": "流式输出",
|
|
2453
|
+
"type": "bool",
|
|
2454
|
+
},
|
|
2455
|
+
"provider_settings.unsupported_streaming_strategy": {
|
|
2456
|
+
"description": "不支持流式回复的平台",
|
|
2457
|
+
"type": "string",
|
|
2458
|
+
"options": ["realtime_segmenting", "turn_off"],
|
|
2459
|
+
"hint": "选择在不支持流式回复的平台上的处理方式。实时分段回复会在系统接收流式响应检测到诸如标点符号等分段点时,立即发送当前已接收的内容",
|
|
2460
|
+
"labels": ["实时分段回复", "关闭流式回复"],
|
|
2461
|
+
"condition": {
|
|
2462
|
+
"provider_settings.streaming_response": True,
|
|
2463
|
+
},
|
|
2464
|
+
},
|
|
2465
|
+
"provider_settings.max_context_length": {
|
|
2466
|
+
"description": "最多携带对话轮数",
|
|
2467
|
+
"type": "int",
|
|
2468
|
+
"hint": "超出这个数量时丢弃最旧的部分,一轮聊天记为 1 条,-1 为不限制",
|
|
2469
|
+
"condition": {
|
|
2470
|
+
"provider_settings.agent_runner_type": "local",
|
|
2471
|
+
},
|
|
2472
|
+
},
|
|
2473
|
+
"provider_settings.dequeue_context_length": {
|
|
2474
|
+
"description": "丢弃对话轮数",
|
|
2475
|
+
"type": "int",
|
|
2476
|
+
"hint": "超出最多携带对话轮数时, 一次丢弃的聊天轮数",
|
|
2477
|
+
"condition": {
|
|
2478
|
+
"provider_settings.agent_runner_type": "local",
|
|
2479
|
+
},
|
|
2480
|
+
},
|
|
2481
|
+
"provider_settings.wake_prefix": {
|
|
2482
|
+
"description": "LLM 聊天额外唤醒前缀 ",
|
|
2483
|
+
"type": "string",
|
|
2484
|
+
"hint": "如果唤醒前缀为 /, 额外聊天唤醒前缀为 chat,则需要 /chat 才会触发 LLM 请求",
|
|
2485
|
+
},
|
|
2486
|
+
"provider_settings.prompt_prefix": {
|
|
2487
|
+
"description": "用户提示词",
|
|
2488
|
+
"type": "string",
|
|
2489
|
+
"hint": "可使用 {{prompt}} 作为用户输入的占位符。如果不输入占位符则代表添加在用户输入的前面。",
|
|
2490
|
+
},
|
|
2491
|
+
"provider_tts_settings.dual_output": {
|
|
2492
|
+
"description": "开启 TTS 时同时输出语音和文字内容",
|
|
2493
|
+
"type": "bool",
|
|
2494
|
+
},
|
|
2495
|
+
},
|
|
2496
|
+
"condition": {
|
|
2497
|
+
"provider_settings.enable": True,
|
|
2498
|
+
},
|
|
2499
|
+
},
|
|
2500
|
+
},
|
|
2501
|
+
},
|
|
2502
|
+
"platform_group": {
|
|
2503
|
+
"name": "平台配置",
|
|
2504
|
+
"metadata": {
|
|
2505
|
+
"general": {
|
|
2506
|
+
"description": "基本",
|
|
2507
|
+
"type": "object",
|
|
2508
|
+
"items": {
|
|
2509
|
+
"admins_id": {
|
|
2510
|
+
"description": "管理员 ID",
|
|
2511
|
+
"type": "list",
|
|
2512
|
+
"items": {"type": "string"},
|
|
2513
|
+
},
|
|
2514
|
+
"platform_settings.unique_session": {
|
|
2515
|
+
"description": "隔离会话",
|
|
2516
|
+
"type": "bool",
|
|
2517
|
+
"hint": "启用后,群成员的上下文独立。",
|
|
2518
|
+
},
|
|
2519
|
+
"wake_prefix": {
|
|
2520
|
+
"description": "唤醒词",
|
|
2521
|
+
"type": "list",
|
|
2522
|
+
"items": {"type": "string"},
|
|
2523
|
+
},
|
|
2524
|
+
"platform_settings.friend_message_needs_wake_prefix": {
|
|
2525
|
+
"description": "私聊消息需要唤醒词",
|
|
2526
|
+
"type": "bool",
|
|
2527
|
+
},
|
|
2528
|
+
"platform_settings.reply_prefix": {
|
|
2529
|
+
"description": "回复时的文本前缀",
|
|
2530
|
+
"type": "string",
|
|
2531
|
+
},
|
|
2532
|
+
"platform_settings.reply_with_mention": {
|
|
2533
|
+
"description": "回复时 @ 发送人",
|
|
2534
|
+
"type": "bool",
|
|
2535
|
+
},
|
|
2536
|
+
"platform_settings.reply_with_quote": {
|
|
2537
|
+
"description": "回复时引用发送人消息",
|
|
2538
|
+
"type": "bool",
|
|
2539
|
+
},
|
|
2540
|
+
"platform_settings.forward_threshold": {
|
|
2541
|
+
"description": "转发消息的字数阈值",
|
|
2542
|
+
"type": "int",
|
|
2543
|
+
},
|
|
2544
|
+
"platform_settings.empty_mention_waiting": {
|
|
2545
|
+
"description": "只 @ 机器人是否触发等待",
|
|
2546
|
+
"type": "bool",
|
|
2547
|
+
},
|
|
2548
|
+
},
|
|
2549
|
+
},
|
|
2550
|
+
"whitelist": {
|
|
2551
|
+
"description": "白名单",
|
|
2552
|
+
"type": "object",
|
|
2553
|
+
"items": {
|
|
2554
|
+
"platform_settings.enable_id_white_list": {
|
|
2555
|
+
"description": "启用白名单",
|
|
2556
|
+
"type": "bool",
|
|
2557
|
+
"hint": "启用后,只有在白名单内的会话会被响应。",
|
|
2558
|
+
},
|
|
2559
|
+
"platform_settings.id_whitelist": {
|
|
2560
|
+
"description": "白名单 ID 列表",
|
|
2561
|
+
"type": "list",
|
|
2562
|
+
"items": {"type": "string"},
|
|
2563
|
+
"hint": "使用 /sid 获取 ID。",
|
|
2564
|
+
},
|
|
2565
|
+
"platform_settings.id_whitelist_log": {
|
|
2566
|
+
"description": "输出日志",
|
|
2567
|
+
"type": "bool",
|
|
2568
|
+
"hint": "启用后,当一条消息没通过白名单时,会输出 INFO 级别的日志。",
|
|
2569
|
+
},
|
|
2570
|
+
"platform_settings.wl_ignore_admin_on_group": {
|
|
2571
|
+
"description": "管理员群组消息无视 ID 白名单",
|
|
2572
|
+
"type": "bool",
|
|
2573
|
+
},
|
|
2574
|
+
"platform_settings.wl_ignore_admin_on_friend": {
|
|
2575
|
+
"description": "管理员私聊消息无视 ID 白名单",
|
|
2576
|
+
"type": "bool",
|
|
2577
|
+
},
|
|
2578
|
+
},
|
|
2579
|
+
},
|
|
2580
|
+
"rate_limit": {
|
|
2581
|
+
"description": "速率限制",
|
|
2582
|
+
"type": "object",
|
|
2583
|
+
"items": {
|
|
2584
|
+
"platform_settings.rate_limit.time": {
|
|
2585
|
+
"description": "消息速率限制时间(秒)",
|
|
2586
|
+
"type": "int",
|
|
2587
|
+
},
|
|
2588
|
+
"platform_settings.rate_limit.count": {
|
|
2589
|
+
"description": "消息速率限制计数",
|
|
2590
|
+
"type": "int",
|
|
2591
|
+
},
|
|
2592
|
+
"platform_settings.rate_limit.strategy": {
|
|
2593
|
+
"description": "速率限制策略",
|
|
2594
|
+
"type": "string",
|
|
2595
|
+
"options": ["stall", "discard"],
|
|
2596
|
+
},
|
|
2597
|
+
},
|
|
2598
|
+
},
|
|
2599
|
+
"content_safety": {
|
|
2600
|
+
"description": "内容安全",
|
|
2601
|
+
"type": "object",
|
|
2602
|
+
"items": {
|
|
2603
|
+
"content_safety.also_use_in_response": {
|
|
2604
|
+
"description": "同时检查模型的响应内容",
|
|
2605
|
+
"type": "bool",
|
|
2606
|
+
},
|
|
2607
|
+
"content_safety.baidu_aip.enable": {
|
|
2608
|
+
"description": "使用百度内容安全审核",
|
|
2609
|
+
"type": "bool",
|
|
2610
|
+
"hint": "您需要手动安装 baidu-aip 库。",
|
|
2611
|
+
},
|
|
2612
|
+
"content_safety.baidu_aip.app_id": {
|
|
2613
|
+
"description": "App ID",
|
|
2614
|
+
"type": "string",
|
|
2615
|
+
"condition": {
|
|
2616
|
+
"content_safety.baidu_aip.enable": True,
|
|
2617
|
+
},
|
|
2618
|
+
},
|
|
2619
|
+
"content_safety.baidu_aip.api_key": {
|
|
2620
|
+
"description": "API Key",
|
|
2621
|
+
"type": "string",
|
|
2622
|
+
"condition": {
|
|
2623
|
+
"content_safety.baidu_aip.enable": True,
|
|
2624
|
+
},
|
|
2625
|
+
},
|
|
2626
|
+
"content_safety.baidu_aip.secret_key": {
|
|
2627
|
+
"description": "Secret Key",
|
|
2628
|
+
"type": "string",
|
|
2629
|
+
"condition": {
|
|
2630
|
+
"content_safety.baidu_aip.enable": True,
|
|
2631
|
+
},
|
|
2632
|
+
},
|
|
2633
|
+
"content_safety.internal_keywords.enable": {
|
|
2634
|
+
"description": "关键词检查",
|
|
2635
|
+
"type": "bool",
|
|
2636
|
+
},
|
|
2637
|
+
"content_safety.internal_keywords.extra_keywords": {
|
|
2638
|
+
"description": "额外关键词",
|
|
2639
|
+
"type": "list",
|
|
2640
|
+
"items": {"type": "string"},
|
|
2641
|
+
"hint": "额外的屏蔽关键词列表,支持正则表达式。",
|
|
2642
|
+
},
|
|
2643
|
+
},
|
|
2644
|
+
},
|
|
2645
|
+
"t2i": {
|
|
2646
|
+
"description": "文本转图像",
|
|
2647
|
+
"type": "object",
|
|
2648
|
+
"items": {
|
|
2649
|
+
"t2i": {
|
|
2650
|
+
"description": "文本转图像输出",
|
|
2651
|
+
"type": "bool",
|
|
2652
|
+
},
|
|
2653
|
+
"t2i_word_threshold": {
|
|
2654
|
+
"description": "文本转图像字数阈值",
|
|
2655
|
+
"type": "int",
|
|
2656
|
+
},
|
|
2657
|
+
},
|
|
2658
|
+
},
|
|
2659
|
+
"others": {
|
|
2660
|
+
"description": "其他配置",
|
|
2661
|
+
"type": "object",
|
|
2662
|
+
"items": {
|
|
2663
|
+
"platform_settings.ignore_bot_self_message": {
|
|
2664
|
+
"description": "是否忽略机器人自身的消息",
|
|
2665
|
+
"type": "bool",
|
|
2666
|
+
},
|
|
2667
|
+
"platform_settings.ignore_at_all": {
|
|
2668
|
+
"description": "是否忽略 @ 全体成员事件",
|
|
2669
|
+
"type": "bool",
|
|
2670
|
+
},
|
|
2671
|
+
"platform_settings.no_permission_reply": {
|
|
2672
|
+
"description": "用户权限不足时是否回复",
|
|
2673
|
+
"type": "bool",
|
|
2674
|
+
},
|
|
2675
|
+
"platform_specific.lark.pre_ack_emoji.enable": {
|
|
2676
|
+
"description": "[飞书] 启用预回应表情",
|
|
2677
|
+
"type": "bool",
|
|
2678
|
+
},
|
|
2679
|
+
"platform_specific.lark.pre_ack_emoji.emojis": {
|
|
2680
|
+
"description": "表情列表(飞书表情枚举名)",
|
|
2681
|
+
"type": "list",
|
|
2682
|
+
"items": {"type": "string"},
|
|
2683
|
+
"hint": "表情枚举名参考:https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce",
|
|
2684
|
+
"condition": {
|
|
2685
|
+
"platform_specific.lark.pre_ack_emoji.enable": True,
|
|
2686
|
+
},
|
|
2687
|
+
},
|
|
2688
|
+
"platform_specific.telegram.pre_ack_emoji.enable": {
|
|
2689
|
+
"description": "[Telegram] 启用预回应表情",
|
|
2690
|
+
"type": "bool",
|
|
2691
|
+
},
|
|
2692
|
+
"platform_specific.telegram.pre_ack_emoji.emojis": {
|
|
2693
|
+
"description": "表情列表(Unicode)",
|
|
2694
|
+
"type": "list",
|
|
2695
|
+
"items": {"type": "string"},
|
|
2696
|
+
"hint": "Telegram 仅支持固定反应集合,参考:https://gist.github.com/Soulter/3f22c8e5f9c7e152e967e8bc28c97fc9",
|
|
2697
|
+
"condition": {
|
|
2698
|
+
"platform_specific.telegram.pre_ack_emoji.enable": True,
|
|
2699
|
+
},
|
|
2700
|
+
},
|
|
2701
|
+
},
|
|
2702
|
+
},
|
|
2703
|
+
},
|
|
2704
|
+
},
|
|
2705
|
+
"plugin_group": {
|
|
2706
|
+
"name": "插件配置",
|
|
2707
|
+
"metadata": {
|
|
2708
|
+
"plugin": {
|
|
2709
|
+
"description": "插件",
|
|
2710
|
+
"type": "object",
|
|
2711
|
+
"items": {
|
|
2712
|
+
"plugin_set": {
|
|
2713
|
+
"description": "可用插件",
|
|
2714
|
+
"type": "bool",
|
|
2715
|
+
"hint": "默认启用全部未被禁用的插件。若插件在插件页面被禁用,则此处的选择不会生效。",
|
|
2716
|
+
"_special": "select_plugin_set",
|
|
2717
|
+
},
|
|
2718
|
+
},
|
|
2719
|
+
},
|
|
2720
|
+
},
|
|
2721
|
+
},
|
|
2722
|
+
"ext_group": {
|
|
2723
|
+
"name": "扩展功能",
|
|
2724
|
+
"metadata": {
|
|
2725
|
+
"segmented_reply": {
|
|
2726
|
+
"description": "分段回复",
|
|
2727
|
+
"type": "object",
|
|
2728
|
+
"items": {
|
|
2729
|
+
"platform_settings.segmented_reply.enable": {
|
|
2730
|
+
"description": "启用分段回复",
|
|
2731
|
+
"type": "bool",
|
|
2732
|
+
},
|
|
2733
|
+
"platform_settings.segmented_reply.only_llm_result": {
|
|
2734
|
+
"description": "仅对 LLM 结果分段",
|
|
2735
|
+
"type": "bool",
|
|
2736
|
+
},
|
|
2737
|
+
"platform_settings.segmented_reply.interval_method": {
|
|
2738
|
+
"description": "间隔方法",
|
|
2739
|
+
"type": "string",
|
|
2740
|
+
"options": ["random", "log"],
|
|
2741
|
+
},
|
|
2742
|
+
"platform_settings.segmented_reply.interval": {
|
|
2743
|
+
"description": "随机间隔时间",
|
|
2744
|
+
"type": "string",
|
|
2745
|
+
"hint": "格式:最小值,最大值(如:1.5,3.5)",
|
|
2746
|
+
"condition": {
|
|
2747
|
+
"platform_settings.segmented_reply.interval_method": "random",
|
|
2748
|
+
},
|
|
2749
|
+
},
|
|
2750
|
+
"platform_settings.segmented_reply.log_base": {
|
|
2751
|
+
"description": "对数底数",
|
|
2752
|
+
"type": "float",
|
|
2753
|
+
"hint": "对数间隔的底数,默认为 2.0。取值范围为 1.0-10.0。",
|
|
2754
|
+
"condition": {
|
|
2755
|
+
"platform_settings.segmented_reply.interval_method": "log",
|
|
2756
|
+
},
|
|
2757
|
+
},
|
|
2758
|
+
"platform_settings.segmented_reply.words_count_threshold": {
|
|
2759
|
+
"description": "分段回复字数阈值",
|
|
2760
|
+
"type": "int",
|
|
2761
|
+
},
|
|
2762
|
+
"platform_settings.segmented_reply.regex": {
|
|
2763
|
+
"description": "分段正则表达式",
|
|
2764
|
+
"type": "string",
|
|
2765
|
+
},
|
|
2766
|
+
"platform_settings.segmented_reply.content_cleanup_rule": {
|
|
2767
|
+
"description": "内容过滤正则表达式",
|
|
2768
|
+
"type": "string",
|
|
2769
|
+
"hint": "移除分段后内容中的指定内容。如填写 `[。?!]` 将移除所有的句号、问号、感叹号。",
|
|
2770
|
+
},
|
|
2771
|
+
},
|
|
2772
|
+
},
|
|
2773
|
+
"ltm": {
|
|
2774
|
+
"description": "群聊上下文感知(原聊天记忆增强)",
|
|
2775
|
+
"type": "object",
|
|
2776
|
+
"items": {
|
|
2777
|
+
"provider_ltm_settings.group_icl_enable": {
|
|
2778
|
+
"description": "启用群聊上下文感知",
|
|
2779
|
+
"type": "bool",
|
|
2780
|
+
},
|
|
2781
|
+
"provider_ltm_settings.group_message_max_cnt": {
|
|
2782
|
+
"description": "最大消息数量",
|
|
2783
|
+
"type": "int",
|
|
2784
|
+
},
|
|
2785
|
+
"provider_ltm_settings.image_caption": {
|
|
2786
|
+
"description": "自动理解图片",
|
|
2787
|
+
"type": "bool",
|
|
2788
|
+
"hint": "需要设置默认图片转述模型。",
|
|
2789
|
+
},
|
|
2790
|
+
"provider_ltm_settings.active_reply.enable": {
|
|
2791
|
+
"description": "主动回复",
|
|
2792
|
+
"type": "bool",
|
|
2793
|
+
},
|
|
2794
|
+
"provider_ltm_settings.active_reply.method": {
|
|
2795
|
+
"description": "主动回复方法",
|
|
2796
|
+
"type": "string",
|
|
2797
|
+
"options": ["possibility_reply"],
|
|
2798
|
+
"condition": {
|
|
2799
|
+
"provider_ltm_settings.active_reply.enable": True,
|
|
2800
|
+
},
|
|
2801
|
+
},
|
|
2802
|
+
"provider_ltm_settings.active_reply.possibility_reply": {
|
|
2803
|
+
"description": "回复概率",
|
|
2804
|
+
"type": "float",
|
|
2805
|
+
"hint": "0.0-1.0 之间的数值",
|
|
2806
|
+
"condition": {
|
|
2807
|
+
"provider_ltm_settings.active_reply.enable": True,
|
|
2808
|
+
},
|
|
2809
|
+
},
|
|
2810
|
+
"provider_ltm_settings.active_reply.whitelist": {
|
|
2811
|
+
"description": "主动回复白名单",
|
|
2812
|
+
"type": "list",
|
|
2813
|
+
"items": {"type": "string"},
|
|
2814
|
+
"hint": "为空时不启用白名单过滤。使用 /sid 获取 ID。",
|
|
2815
|
+
"condition": {
|
|
2816
|
+
"provider_ltm_settings.active_reply.enable": True,
|
|
2817
|
+
},
|
|
2818
|
+
},
|
|
2819
|
+
},
|
|
2820
|
+
},
|
|
2821
|
+
},
|
|
2822
|
+
},
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
CONFIG_METADATA_3_SYSTEM = {
|
|
2826
|
+
"system_group": {
|
|
2827
|
+
"name": "系统配置",
|
|
2828
|
+
"metadata": {
|
|
2829
|
+
"system": {
|
|
2830
|
+
"description": "系统配置",
|
|
2831
|
+
"type": "object",
|
|
2832
|
+
"items": {
|
|
2833
|
+
"t2i_strategy": {
|
|
2834
|
+
"description": "文本转图像策略",
|
|
2835
|
+
"type": "string",
|
|
2836
|
+
"hint": "文本转图像策略。`remote` 为使用远程基于 HTML 的渲染服务,`local` 为使用 PIL 本地渲染。当使用 local 时,将 ttf 字体命名为 'font.ttf' 放在 data/ 目录下可自定义字体。",
|
|
2837
|
+
"options": ["remote", "local"],
|
|
2838
|
+
},
|
|
2839
|
+
"t2i_endpoint": {
|
|
2840
|
+
"description": "文本转图像服务 API 地址",
|
|
2841
|
+
"type": "string",
|
|
2842
|
+
"hint": "为空时使用 AstrBot API 服务",
|
|
2843
|
+
"condition": {
|
|
2844
|
+
"t2i_strategy": "remote",
|
|
2845
|
+
},
|
|
2846
|
+
},
|
|
2847
|
+
"t2i_template": {
|
|
2848
|
+
"description": "文本转图像自定义模版",
|
|
2849
|
+
"type": "bool",
|
|
2850
|
+
"hint": "启用后可自定义 HTML 模板用于文转图渲染。",
|
|
2851
|
+
"condition": {
|
|
2852
|
+
"t2i_strategy": "remote",
|
|
2853
|
+
},
|
|
2854
|
+
"_special": "t2i_template",
|
|
2855
|
+
},
|
|
2856
|
+
"t2i_active_template": {
|
|
2857
|
+
"description": "当前应用的文转图渲染模板",
|
|
2858
|
+
"type": "string",
|
|
2859
|
+
"hint": "此处的值由文转图模板管理页面进行维护。",
|
|
2860
|
+
"invisible": True,
|
|
2861
|
+
},
|
|
2862
|
+
"log_level": {
|
|
2863
|
+
"description": "控制台日志级别",
|
|
2864
|
+
"type": "string",
|
|
2865
|
+
"hint": "控制台输出日志的级别。",
|
|
2866
|
+
"options": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
|
2867
|
+
},
|
|
2868
|
+
"pip_install_arg": {
|
|
2869
|
+
"description": "pip 安装额外参数",
|
|
2870
|
+
"type": "string",
|
|
2871
|
+
"hint": "安装插件依赖时,会使用 Python 的 pip 工具。这里可以填写额外的参数,如 `--break-system-package` 等。",
|
|
2872
|
+
},
|
|
2873
|
+
"pypi_index_url": {
|
|
2874
|
+
"description": "PyPI 软件仓库地址",
|
|
2875
|
+
"type": "string",
|
|
2876
|
+
"hint": "安装 Python 依赖时请求的 PyPI 软件仓库地址。默认为 https://mirrors.aliyun.com/pypi/simple/",
|
|
2877
|
+
},
|
|
2878
|
+
"callback_api_base": {
|
|
2879
|
+
"description": "对外可达的回调接口地址",
|
|
2880
|
+
"type": "string",
|
|
2881
|
+
"hint": "外部服务可能会通过 AstrBot 生成的回调链接(如文件下载链接)访问 AstrBot 后端。由于 AstrBot 无法自动判断部署环境中对外可达的主机地址(host),因此需要通过此配置项显式指定 “外部服务如何访问 AstrBot” 的地址。如 http://localhost:6185,https://example.com 等。",
|
|
2882
|
+
},
|
|
2883
|
+
"timezone": {
|
|
2884
|
+
"description": "时区",
|
|
2885
|
+
"type": "string",
|
|
2886
|
+
"hint": "时区设置。请填写 IANA 时区名称, 如 Asia/Shanghai, 为空时使用系统默认时区。所有时区请查看: https://data.iana.org/time-zones/tzdb-2021a/zone1970.tab",
|
|
2887
|
+
},
|
|
2888
|
+
"http_proxy": {
|
|
2889
|
+
"description": "HTTP 代理",
|
|
2890
|
+
"type": "string",
|
|
2891
|
+
"hint": "启用后,会以添加环境变量的方式设置代理。格式为 `http://ip:port`",
|
|
2892
|
+
},
|
|
2893
|
+
"no_proxy": {
|
|
2894
|
+
"description": "直连地址列表",
|
|
2895
|
+
"type": "list",
|
|
2896
|
+
"items": {"type": "string"},
|
|
2897
|
+
},
|
|
2898
|
+
},
|
|
2899
|
+
},
|
|
2900
|
+
},
|
|
2901
|
+
},
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
DEFAULT_VALUE_MAP = {
|
|
2906
|
+
"int": 0,
|
|
2907
|
+
"float": 0.0,
|
|
2908
|
+
"bool": False,
|
|
2909
|
+
"string": "",
|
|
2910
|
+
"text": "",
|
|
2911
|
+
"list": [],
|
|
2912
|
+
"object": {},
|
|
2913
|
+
}
|