From 75152421d985bfdd5f4e51b4d397ef7a783fa67e Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Mon, 14 Oct 2024 09:26:22 +0800 Subject: [PATCH] fix: DashScope upgrade --- src/renderer/src/config/models.ts | 6 +++--- src/renderer/src/config/providers.ts | 4 ++-- src/renderer/src/i18n/en-us.json | 2 +- src/renderer/src/i18n/zh-cn.json | 2 +- src/renderer/src/i18n/zh-tw.json | 2 +- src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/llm.ts | 2 +- src/renderer/src/store/migrate.ts | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/renderer/src/config/models.ts b/src/renderer/src/config/models.ts index 104612dd..7eb1f314 100644 --- a/src/renderer/src/config/models.ts +++ b/src/renderer/src/config/models.ts @@ -698,19 +698,19 @@ export const SYSTEM_MODELS: Record = { bailian: [ { id: 'qwen-turbo', - provider: 'bailian', + provider: 'dashscope', name: 'Qwen Turbo', group: 'Qwen' }, { id: 'qwen-plus', - provider: 'bailian', + provider: 'dashscope', name: 'Qwen Plus', group: 'Qwen' }, { id: 'qwen-max', - provider: 'bailian', + provider: 'dashscope', name: 'Qwen Max', group: 'Qwen' } diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index ce8cfe1f..46c831d6 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -46,7 +46,7 @@ export function getProviderLogo(providerId: string) { return OpenRouterProviderLogo case 'baichuan': return BaichuanProviderLogo - case 'bailian': + case 'dashscope': return BailianProviderLogo case 'anthropic': return AnthropicProviderLogo @@ -203,7 +203,7 @@ export const PROVIDER_CONFIG = { models: 'https://platform.baichuan-ai.com/price' } }, - bailian: { + dashscope: { api: { url: 'https://dashscope.aliyuncs.com/compatible-mode/v1/' }, diff --git a/src/renderer/src/i18n/en-us.json b/src/renderer/src/i18n/en-us.json index 74fabbbb..8d29a92a 100644 --- a/src/renderer/src/i18n/en-us.json +++ b/src/renderer/src/i18n/en-us.json @@ -169,7 +169,7 @@ "groq": "Groq", "ollama": "Ollama", "baichuan": "Baichuan", - "bailian": "Alibaba Cloud", + "dashscope": "Alibaba Cloud", "anthropic": "Anthropic", "aihubmix": "AiHubMix", "stepfun": "StepFun", diff --git a/src/renderer/src/i18n/zh-cn.json b/src/renderer/src/i18n/zh-cn.json index 5bd866a4..80464c31 100644 --- a/src/renderer/src/i18n/zh-cn.json +++ b/src/renderer/src/i18n/zh-cn.json @@ -169,7 +169,7 @@ "groq": "Groq", "ollama": "Ollama", "baichuan": "百川", - "bailian": "阿里云百炼", + "dashscope": "阿里云百炼", "anthropic": "Anthropic", "aihubmix": "AiHubMix", "stepfun": "阶跃星辰", diff --git a/src/renderer/src/i18n/zh-tw.json b/src/renderer/src/i18n/zh-tw.json index 8a30dfb2..96f2a398 100644 --- a/src/renderer/src/i18n/zh-tw.json +++ b/src/renderer/src/i18n/zh-tw.json @@ -169,7 +169,7 @@ "groq": "Groq", "ollama": "Ollama", "baichuan": "百川", - "bailian": "阿里雲百鍊", + "dashscope": "阿里雲百鍊", "anthropic": "Anthropic", "aihubmix": "AiHubMix", "stepfun": "StepFun", diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 7df481a8..977dc189 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -22,7 +22,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 32, + version: 31, blacklist: ['runtime'], migrate }, diff --git a/src/renderer/src/store/llm.ts b/src/renderer/src/store/llm.ts index 94df76f9..57327ce2 100644 --- a/src/renderer/src/store/llm.ts +++ b/src/renderer/src/store/llm.ts @@ -142,7 +142,7 @@ const initialState: LlmState = { enabled: false }, { - id: 'bailian', + id: 'dashscope', name: 'Bailian', apiKey: '', apiHost: 'https://dashscope.aliyuncs.com/compatible-mode/v1/', diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 98288dea..24e31028 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -178,8 +178,8 @@ const migrateConfig = { providers: [ ...state.llm.providers, { - id: 'bailian', - name: 'Bailian', + id: 'dashscope', + name: 'DashScope', apiKey: '', apiHost: 'https://dashscope.aliyuncs.com/compatible-mode/v1/', models: SYSTEM_MODELS.bailian,