From a60f42b1f22de31947fa5bfab98327e4f6e59c1c Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 11 May 2025 04:04:05 -0400 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=9C=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=8C=87=E5=AE=9A=E6=8F=90=E4=BE=9B=E5=95=86?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/config/default.py | 36 +++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 33ebbfa34..9fde3c36b 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -497,6 +497,7 @@ CONFIG_METADATA_2 = { "OpenAI": { "id": "openai", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://api.openai.com/v1", @@ -508,6 +509,7 @@ CONFIG_METADATA_2 = { "Azure_OpenAI": { "id": "azure", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "api_version": "2024-05-01-preview", "key": [], @@ -520,6 +522,7 @@ CONFIG_METADATA_2 = { "xAI(grok)": { "id": "xai", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://api.x.ai/v1", @@ -531,6 +534,7 @@ CONFIG_METADATA_2 = { "Anthropic(claude)": { "id": "claude", "type": "anthropic_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://api.anthropic.com/v1", @@ -543,6 +547,7 @@ CONFIG_METADATA_2 = { "Ollama": { "id": "ollama_default", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": ["ollama"], # ollama 的 key 默认是 ollama "api_base": "http://localhost:11434/v1", @@ -553,6 +558,7 @@ CONFIG_METADATA_2 = { "LM_Studio": { "id": "lm_studio", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": ["lmstudio"], "api_base": "http://localhost:1234/v1", @@ -563,6 +569,7 @@ CONFIG_METADATA_2 = { "Gemini(OpenAI兼容)": { "id": "gemini_default", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://generativelanguage.googleapis.com/v1beta/openai/", @@ -574,6 +581,7 @@ CONFIG_METADATA_2 = { "Gemini(googlegenai原生)": { "id": "gemini_default", "type": "googlegenai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://generativelanguage.googleapis.com/", @@ -597,6 +605,7 @@ CONFIG_METADATA_2 = { "DeepSeek": { "id": "deepseek_default", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://api.deepseek.com/v1", @@ -608,6 +617,7 @@ CONFIG_METADATA_2 = { "Zhipu(智谱)": { "id": "zhipu_default", "type": "zhipu_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "timeout": 120, @@ -619,6 +629,7 @@ CONFIG_METADATA_2 = { "SiliconFlow(硅基流动)": { "id": "siliconflow", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "timeout": 120, @@ -630,6 +641,7 @@ CONFIG_METADATA_2 = { "MoonShot(Kimi)": { "id": "moonshot", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "timeout": 120, @@ -641,6 +653,7 @@ CONFIG_METADATA_2 = { "LLMTuner": { "id": "llmtuner_default", "type": "llm_tuner", + "provider_type": "chat_completion", "enable": True, "base_model_path": "", "adapter_model_path": "", @@ -651,6 +664,7 @@ CONFIG_METADATA_2 = { "Dify": { "id": "dify_app_default", "type": "dify", + "provider_type": "chat_completion", "enable": True, "dify_api_type": "chat", "dify_api_key": "", @@ -663,6 +677,7 @@ CONFIG_METADATA_2 = { "Dashscope(阿里云百炼应用)": { "id": "dashscope", "type": "dashscope", + "provider_type": "chat_completion", "enable": True, "dashscope_app_type": "agent", "dashscope_api_key": "", @@ -678,6 +693,7 @@ CONFIG_METADATA_2 = { "FastGPT": { "id": "fastgpt", "type": "openai_chat_completion", + "provider_type": "chat_completion", "enable": True, "key": [], "api_base": "https://api.fastgpt.in/api/v1", @@ -686,6 +702,7 @@ CONFIG_METADATA_2 = { "Whisper(API)": { "id": "whisper", "type": "openai_whisper_api", + "provider_type": "speech_to_text", "enable": False, "api_key": "", "api_base": "", @@ -693,22 +710,25 @@ CONFIG_METADATA_2 = { }, "Whisper(本地加载)": { "whisper_hint": "(不用修改我)", + "type": "openai_whisper_selfhost", + "provider_type": "speech_to_text", "enable": False, "id": "whisper", - "type": "openai_whisper_selfhost", "model": "tiny", }, "sensevoice(本地加载)": { "sensevoice_hint": "(不用修改我)", + "type": "sensevoice_stt_selfhost", + "provider_type": "speech_to_text", "enable": False, "id": "sensevoice", - "type": "sensevoice_stt_selfhost", "stt_model": "iic/SenseVoiceSmall", "is_emotion": False, }, "OpenAI_TTS(API)": { "id": "openai_tts", "type": "openai_tts_api", + "provider_type": "text_to_speech", "enable": False, "api_key": "", "api_base": "", @@ -720,6 +740,7 @@ CONFIG_METADATA_2 = { "edgetts_hint": "提示:使用这个服务前需要安装有 ffmpeg,并且可以直接在终端调用 ffmpeg 指令。", "id": "edge_tts", "type": "edge_tts", + "provider_type": "text_to_speech", "enable": False, "edge-tts-voice": "zh-CN-XiaoxiaoNeural", "timeout": 20, @@ -727,6 +748,7 @@ CONFIG_METADATA_2 = { "GSVI_TTS(API)": { "id": "gsvi_tts", "type": "gsvi_tts_api", + "provider_type": "text_to_speech", "api_base": "http://127.0.0.1:5000", "character": "", "emotion": "default", @@ -736,6 +758,7 @@ CONFIG_METADATA_2 = { "FishAudio_TTS(API)": { "id": "fishaudio_tts", "type": "fishaudio_tts_api", + "provider_type": "text_to_speech", "enable": False, "api_key": "", "api_base": "https://api.fish.audio/v1", @@ -745,6 +768,7 @@ CONFIG_METADATA_2 = { "阿里云百炼_TTS(API)": { "id": "dashscope_tts", "type": "dashscope_tts", + "provider_type": "text_to_speech", "enable": False, "api_key": "", "model": "cosyvoice-v1", @@ -754,6 +778,7 @@ CONFIG_METADATA_2 = { "Azure_TTS": { "id": "azure_tts", "type": "azure_tts", + "provider_type": "text_to_speech", "enable": True, "azure_tts_voice": "zh-CN-YunxiaNeural", "azure_tts_style": "cheerful", @@ -983,7 +1008,12 @@ CONFIG_METADATA_2 = { "hint": "ID 不能和其它的服务提供商重复,否则将发生严重冲突。", }, "type": { - "description": "模型提供商类型", + "description": "模型提供商种类", + "type": "string", + "invisible": True, + }, + "provider_type": { + "description": "模型提供商能力种类", "type": "string", "invisible": True, }, From d8d81b05a7d5ef7d493f72b7a6a370e29f9d0e55 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 11 May 2025 17:30:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=9B=B4=E7=9B=B4?= =?UTF-8?q?=E8=A7=82=E7=9A=84=E6=A8=A1=E5=9E=8B=E6=8F=90=E4=BE=9B=E5=95=86?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/config/default.py | 32 +-- .../src/assets/images/auth/social-google.svg | 6 - dashboard/src/assets/images/favicon.svg | 18 -- .../src/assets/images/icons/icon-card.svg | 5 - dashboard/src/assets/images/logos/logo.svg | 12 -- .../src/assets/images/logos/logolight.svg | 12 -- .../images/maintenance/img-error-bg.svg | 34 ---- .../images/maintenance/img-error-blue.svg | 43 ---- .../images/maintenance/img-error-purple.svg | 42 ---- .../images/maintenance/img-error-text.svg | 27 --- .../src/assets/images/profile/user-round.svg | 15 -- dashboard/src/views/ProviderPage.vue | 186 ++++++++++++++++-- 12 files changed, 182 insertions(+), 250 deletions(-) delete mode 100644 dashboard/src/assets/images/auth/social-google.svg delete mode 100644 dashboard/src/assets/images/favicon.svg delete mode 100644 dashboard/src/assets/images/icons/icon-card.svg delete mode 100644 dashboard/src/assets/images/logos/logo.svg delete mode 100644 dashboard/src/assets/images/logos/logolight.svg delete mode 100644 dashboard/src/assets/images/maintenance/img-error-bg.svg delete mode 100644 dashboard/src/assets/images/maintenance/img-error-blue.svg delete mode 100644 dashboard/src/assets/images/maintenance/img-error-purple.svg delete mode 100644 dashboard/src/assets/images/maintenance/img-error-text.svg delete mode 100644 dashboard/src/assets/images/profile/user-round.svg diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 9fde3c36b..cfaa00e26 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -506,7 +506,7 @@ CONFIG_METADATA_2 = { "model": "gpt-4o-mini", }, }, - "Azure_OpenAI": { + "Azure OpenAI": { "id": "azure", "type": "openai_chat_completion", "provider_type": "chat_completion", @@ -519,7 +519,7 @@ CONFIG_METADATA_2 = { "model": "gpt-4o-mini", }, }, - "xAI(grok)": { + "xAI": { "id": "xai", "type": "openai_chat_completion", "provider_type": "chat_completion", @@ -531,7 +531,7 @@ CONFIG_METADATA_2 = { "model": "grok-2-latest", }, }, - "Anthropic(claude)": { + "Anthropic": { "id": "claude", "type": "anthropic_chat_completion", "provider_type": "chat_completion", @@ -555,7 +555,7 @@ CONFIG_METADATA_2 = { "model": "llama3.1-8b", }, }, - "LM_Studio": { + "LM Studio": { "id": "lm_studio", "type": "openai_chat_completion", "provider_type": "chat_completion", @@ -578,7 +578,7 @@ CONFIG_METADATA_2 = { "model": "gemini-1.5-flash", }, }, - "Gemini(googlegenai原生)": { + "Gemini": { "id": "gemini_default", "type": "googlegenai_chat_completion", "provider_type": "chat_completion", @@ -614,7 +614,7 @@ CONFIG_METADATA_2 = { "model": "deepseek-chat", }, }, - "Zhipu(智谱)": { + "智谱 AI": { "id": "zhipu_default", "type": "zhipu_chat_completion", "provider_type": "chat_completion", @@ -626,7 +626,7 @@ CONFIG_METADATA_2 = { "model": "glm-4-flash", }, }, - "SiliconFlow(硅基流动)": { + "硅基流动": { "id": "siliconflow", "type": "openai_chat_completion", "provider_type": "chat_completion", @@ -638,7 +638,7 @@ CONFIG_METADATA_2 = { "model": "deepseek-ai/DeepSeek-V3", }, }, - "MoonShot(Kimi)": { + "Kimi": { "id": "moonshot", "type": "openai_chat_completion", "provider_type": "chat_completion", @@ -674,7 +674,7 @@ CONFIG_METADATA_2 = { "variables": {}, "timeout": 60, }, - "Dashscope(阿里云百炼应用)": { + "阿里云百炼应用": { "id": "dashscope", "type": "dashscope", "provider_type": "chat_completion", @@ -716,7 +716,7 @@ CONFIG_METADATA_2 = { "id": "whisper", "model": "tiny", }, - "sensevoice(本地加载)": { + "SenseVoice(本地加载)": { "sensevoice_hint": "(不用修改我)", "type": "sensevoice_stt_selfhost", "provider_type": "speech_to_text", @@ -725,7 +725,7 @@ CONFIG_METADATA_2 = { "stt_model": "iic/SenseVoiceSmall", "is_emotion": False, }, - "OpenAI_TTS(API)": { + "OpenAI TTS(API)": { "id": "openai_tts", "type": "openai_tts_api", "provider_type": "text_to_speech", @@ -736,7 +736,7 @@ CONFIG_METADATA_2 = { "openai-tts-voice": "alloy", "timeout": "20", }, - "Edge_TTS": { + "Edge TTS": { "edgetts_hint": "提示:使用这个服务前需要安装有 ffmpeg,并且可以直接在终端调用 ffmpeg 指令。", "id": "edge_tts", "type": "edge_tts", @@ -745,7 +745,7 @@ CONFIG_METADATA_2 = { "edge-tts-voice": "zh-CN-XiaoxiaoNeural", "timeout": 20, }, - "GSVI_TTS(API)": { + "GSVI TTS(API)": { "id": "gsvi_tts", "type": "gsvi_tts_api", "provider_type": "text_to_speech", @@ -755,7 +755,7 @@ CONFIG_METADATA_2 = { "enable": False, "timeout": 20, }, - "FishAudio_TTS(API)": { + "FishAudio TTS(API)": { "id": "fishaudio_tts", "type": "fishaudio_tts_api", "provider_type": "text_to_speech", @@ -765,7 +765,7 @@ CONFIG_METADATA_2 = { "fishaudio-tts-character": "可莉", "timeout": "20", }, - "阿里云百炼_TTS(API)": { + "阿里云百炼 TTS(API)": { "id": "dashscope_tts", "type": "dashscope_tts", "provider_type": "text_to_speech", @@ -775,7 +775,7 @@ CONFIG_METADATA_2 = { "dashscope_tts_voice": "loongstella", "timeout": "20", }, - "Azure_TTS": { + "Azure TTS": { "id": "azure_tts", "type": "azure_tts", "provider_type": "text_to_speech", diff --git a/dashboard/src/assets/images/auth/social-google.svg b/dashboard/src/assets/images/auth/social-google.svg deleted file mode 100644 index 2231ce986..000000000 --- a/dashboard/src/assets/images/auth/social-google.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dashboard/src/assets/images/favicon.svg b/dashboard/src/assets/images/favicon.svg deleted file mode 100644 index 72033ff62..000000000 --- a/dashboard/src/assets/images/favicon.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/icons/icon-card.svg b/dashboard/src/assets/images/icons/icon-card.svg deleted file mode 100644 index e877b599e..000000000 --- a/dashboard/src/assets/images/icons/icon-card.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/dashboard/src/assets/images/logos/logo.svg b/dashboard/src/assets/images/logos/logo.svg deleted file mode 100644 index 79eb9bd9d..000000000 --- a/dashboard/src/assets/images/logos/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/logos/logolight.svg b/dashboard/src/assets/images/logos/logolight.svg deleted file mode 100644 index a02bbbba9..000000000 --- a/dashboard/src/assets/images/logos/logolight.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/maintenance/img-error-bg.svg b/dashboard/src/assets/images/maintenance/img-error-bg.svg deleted file mode 100644 index 57af439c9..000000000 --- a/dashboard/src/assets/images/maintenance/img-error-bg.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/maintenance/img-error-blue.svg b/dashboard/src/assets/images/maintenance/img-error-blue.svg deleted file mode 100644 index a72084386..000000000 --- a/dashboard/src/assets/images/maintenance/img-error-blue.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/maintenance/img-error-purple.svg b/dashboard/src/assets/images/maintenance/img-error-purple.svg deleted file mode 100644 index 12904c1a8..000000000 --- a/dashboard/src/assets/images/maintenance/img-error-purple.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/maintenance/img-error-text.svg b/dashboard/src/assets/images/maintenance/img-error-text.svg deleted file mode 100644 index 16ed50aaf..000000000 --- a/dashboard/src/assets/images/maintenance/img-error-text.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard/src/assets/images/profile/user-round.svg b/dashboard/src/assets/images/profile/user-round.svg deleted file mode 100644 index db47c4ba8..000000000 --- a/dashboard/src/assets/images/profile/user-round.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/dashboard/src/views/ProviderPage.vue b/dashboard/src/views/ProviderPage.vue index 2adc7cfcc..066be2c57 100644 --- a/dashboard/src/views/ProviderPage.vue +++ b/dashboard/src/views/ProviderPage.vue @@ -20,23 +20,9 @@ 服务提供商 {{ config_data.provider?.length || 0 }} - - - - - {{ index }} - - - + + 新增服务提供商 + @@ -97,6 +83,71 @@ + + + + + mdi-plus-circle + 服务提供商 + + + mdi-close + + + + + + + mdi-message-text + 基本 + + + mdi-microphone-message + 语音转文字 + + + mdi-volume-high + 文字转语音 + + + + + + + + + + + {{ name }} + + + {{ getProviderDescription(template) }} + + + + + + 暂无{{ getTabTypeName(tabType) }}类型的提供商模板 + + + + + + + + + @@ -170,6 +221,10 @@ export default { save_message_success: "success", showConsole: false, + + // 新增提供商对话框相关 + showAddProviderDialog: false, + activeProviderTab: 'chat_completion', } }, @@ -188,13 +243,79 @@ export default { }); }, - addFromDefaultConfigTmpl(index) { - this.newSelectedProviderName = index[0]; + // 按提供商类型获取模板列表 + getTemplatesByType(type) { + const templates = this.metadata['provider_group']?.metadata?.provider?.config_template || {}; + const filtered = {}; + + for (const [name, template] of Object.entries(templates)) { + if (template.provider_type === type) { + filtered[name] = template; + } + } + + return filtered; + }, + + // 获取提供商类型对应的图标 + getProviderIcon(type) { + const icons = { + 'OpenAI': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openai.svg', + 'Azure OpenAI': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openai.svg', + 'Whisper': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/openai.svg', + 'xAI': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/xai.svg', + 'Anthropic': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/anthropic.svg', + 'Ollama': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/anthropic.svg', + 'Gemini': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/gemini-color.svg', + 'Gemini(OpenAI兼容)': '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', + '智谱 AI': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/zhipu.svg', + '硅基流动': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/siliconcloud.svg', + 'Kimi': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/kimi.svg', + 'Dify': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/dify-color.svg', + '阿里云百炼': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/alibabacloud-color.svg', + 'FastGPT': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/fastgpt-color.svg', + 'LM Studio': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/lmstudio.svg', + 'FishAudio': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/fishaudio.svg', + 'Azure': 'https://registry.npmmirror.com/@lobehub/icons-static-svg/latest/files/icons/azure.svg', + }; + for (const key in icons) { + if (type.startsWith(key)) { + return icons[key]; + } + } + return '' + }, + + // 获取Tab类型的中文名称 + getTabTypeName(tabType) { + const names = { + 'chat_completion': '基本对话', + 'speech_to_text': '语音转文本', + 'text_to_speech': '文本转语音' + }; + return names[tabType] || tabType; + }, + + // 获取提供商简介 + getProviderDescription(template) { + return `${template.type} 服务提供商`; + }, + + // 选择提供商模板 + selectProviderTemplate(name) { + this.newSelectedProviderName = name; this.showProviderCfg = true; this.updatingMode = false; this.newSelectedProviderConfig = JSON.parse(JSON.stringify( - this.metadata['provider_group']?.metadata?.provider?.config_template[index[0]] || {} + this.metadata['provider_group']?.metadata?.provider?.config_template[name] || {} )); + this.showAddProviderDialog = false; + }, + + // 废弃旧方法,保留为兼容 + addFromDefaultConfigTmpl(index) { + this.selectProviderTemplate(index[0]); }, configExistingProvider(provider) { @@ -326,4 +447,29 @@ export default { padding: 20px; padding-top: 8px; } + +.provider-selection-dialog .v-card-title { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + +.provider-card { + transition: all 0.3s ease; + height: 100%; + cursor: pointer; +} + +.provider-card:hover { + transform: translateY(-4px); + box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.05); + border-color: var(--v-primary-base); +} + +.v-tabs { + border-radius: 8px; +} + +.v-window { + border-radius: 4px; +} \ No newline at end of file From fc06ce9d7f17ae816ad9d5ae18c89f02bed3a524 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 11 May 2025 17:36:16 +0800 Subject: [PATCH 3/3] perf: hint --- dashboard/src/views/ProviderPage.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dashboard/src/views/ProviderPage.vue b/dashboard/src/views/ProviderPage.vue index 066be2c57..9f27854d6 100644 --- a/dashboard/src/views/ProviderPage.vue +++ b/dashboard/src/views/ProviderPage.vue @@ -132,7 +132,7 @@ {{ name }} - {{ getProviderDescription(template) }} + {{ getProviderDescription(template, name) }} @@ -298,7 +298,10 @@ export default { }, // 获取提供商简介 - getProviderDescription(template) { + getProviderDescription(template, name) { + if (name == 'OpenAI') { + return `${template.type} 服务提供商。同时也支持所有兼容 OpenAI API 的模型提供商。`; + } return `${template.type} 服务提供商`; },