From 7f7a08926d935da6213c51f04c79486830689899 Mon Sep 17 00:00:00 2001 From: AnotiaWang Date: Tue, 18 Feb 2025 11:32:47 +0800 Subject: [PATCH] feat: add AI provider SiliconFlow --- components/ConfigManager.vue | 35 +++++++++++++++++++++++++++++------ composables/useAiProvider.ts | 1 + i18n/en.json | 6 +++++- i18n/zh.json | 6 +++++- stores/config.ts | 19 ++++++++++++------- 5 files changed, 52 insertions(+), 15 deletions(-) diff --git a/components/ConfigManager.vue b/components/ConfigManager.vue index 6c4259b..5ba9a99 100644 --- a/components/ConfigManager.vue +++ b/components/ConfigManager.vue @@ -23,9 +23,20 @@ const aiProviderOptions = computed(() => [ { label: t('settings.ai.providers.openaiCompatible.title'), - help: t('settings.ai.providers.openaiCompatible.description'), + help: 'settings.ai.providers.openaiCompatible.description', + // Only kept for easy reference in i18n Ally + _help: t('settings.ai.providers.openaiCompatible.description'), value: 'openai-compatible', }, + { + label: t('settings.ai.providers.siliconflow.title'), + help: 'settings.ai.providers.siliconflow.description', + // Only kept for easy reference in i18n Ally + _help: t('settings.ai.providers.siliconflow.description'), + value: 'siliconflow', + link: 'https://cloud.siliconflow.cn/i/J0NHrrX8', + linkText: 'cloud.siliconflow.cn', + }, { label: 'DeepSeek', value: 'deepseek', @@ -141,14 +152,26 @@

{{ $t('settings.ai.provider') }}

-