From 4fcd09cfa85fec9bd155b372f8d3204797b8da95 Mon Sep 17 00:00:00 2001 From: yrk111222 <2493404415@qq.com> Date: Sat, 2 Aug 2025 14:14:08 +0800 Subject: [PATCH] feat: add ModelScope API support (#2230) * add ModelScope API support * update --- astrbot/core/config/default.py | 13 +++++++++++++ dashboard/src/views/ProviderPage.vue | 1 + 2 files changed, 14 insertions(+) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 89034796..60d45be1 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -814,6 +814,19 @@ CONFIG_METADATA_2 = { "variables": {}, "timeout": 60, }, + "ModelScope": { + "id": "modelscope", + "provider": "modelscope", + "type": "openai_chat_completion", + "provider_type": "chat_completion", + "enable": True, + "key": [], + "timeout": 120, + "api_base": "https://api-inference.modelscope.cn/v1", + "model_config": { + "model": "Qwen/Qwen3-32B", + }, + }, "FastGPT": { "id": "fastgpt", "provider": "fastgpt", diff --git a/dashboard/src/views/ProviderPage.vue b/dashboard/src/views/ProviderPage.vue index f9885669..b1949841 100644 --- a/dashboard/src/views/ProviderPage.vue +++ b/dashboard/src/views/ProviderPage.vue @@ -549,6 +549,7 @@ export default { 'ollama': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/ollama.svg', 'google': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/gemini-color.svg', 'deepseek': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/deepseek.svg', + 'modelscope': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/modelscope.svg', 'zhipu': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/zhipu.svg', 'siliconflow': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/siliconcloud.svg', 'moonshot': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/kimi.svg',