新增:腾讯混元服务商

This commit is contained in:
1355873789 2024-10-15 01:58:17 +08:00
parent f5799ef47b
commit 5780141df4
8 changed files with 106 additions and 1 deletions

View File

@ -798,6 +798,56 @@ export const SYSTEM_MODELS: Record<string, Model[]> = {
group: '360Gpt'
}
],
hunyuan: [
{
id: 'hunyuan-pro',
provider: 'hunyuan',
name: 'hunyuan-pro',
group: 'Hunyuan'
},
{
id: 'hunyuan-standard',
provider: 'hunyuan',
name: 'hunyuan-standard',
group: 'Hunyuan'
},
{
id: 'hunyuan-lite',
provider: 'hunyuan',
name: 'hunyuan-lite',
group: 'Hunyuan'
},
{
id: 'hunyuan-standard-256k',
provider: 'hunyuan',
name: 'hunyuan-standard-256k',
group: 'Hunyuan'
},
{
id: 'hunyuan-vision',
provider: 'hunyuan',
name: 'hunyuan-vision',
group: 'Hunyuan'
},
{
id: 'hunyuan-code',
provider: 'hunyuan',
name: 'hunyuan-code',
group: 'Hunyuan'
},
{
id: 'hunyuan-role',
provider: 'hunyuan',
name: 'hunyuan-role',
group: 'Hunyuan'
},
{
id: 'hunyuan-turbo',
provider: 'hunyuan',
name: 'hunyuan-turbo',
group: 'Hunyuan'
}
],
nvidia: [
{
id: '01-ai/yi-large',

View File

@ -1,4 +1,5 @@
import ZhinaoProviderLogo from '@renderer/assets/images/models/360.png'
import HunyuanProviderLogo from '@renderer/assets/images/models/hunyuan.png'
import AzureProviderLogo from '@renderer/assets/images/models/microsoft.png'
import AiHubMixProviderLogo from '@renderer/assets/images/providers/aihubmix.jpg'
import AnthropicProviderLogo from '@renderer/assets/images/providers/anthropic.png'
@ -76,6 +77,8 @@ export function getProviderLogo(providerId: string) {
return NvidiaProviderLogo
case 'azure-openai':
return AzureProviderLogo
case 'hunyuan':
return HunyuanProviderLogo
default:
return undefined
}
@ -328,6 +331,17 @@ export const PROVIDER_CONFIG = {
models: 'https://ai.360.com/platform/limit'
}
},
hunyuan: {
api: {
url: 'https://api.hunyuan.cloud.tencent.com'
},
websites: {
official: 'https://cloud.tencent.com/product/hunyuan',
apiKey: 'https://console.cloud.tencent.com/hunyuan/api-key',
docs: 'https://cloud.tencent.com/document/product/1729/111007',
models: 'https://cloud.tencent.com/document/product/1729/104753'
}
},
nvidia: {
api: {
url: 'https://integrate.api.nvidia.com'

View File

@ -158,6 +158,7 @@
},
"provider": {
"nvidia": "Nvidia",
"hunyuan": "Tencent Hunyuan",
"zhinao": "360AI",
"fireworks": "Fireworks",
"together": "Together",

View File

@ -158,6 +158,7 @@
},
"provider": {
"nvidia": "英伟达",
"hunyuan": "腾讯混元",
"zhinao": "360智脑",
"fireworks": "Fireworks",
"together": "Together",

View File

@ -159,6 +159,7 @@
"provider": {
"nvidia": "輝達",
"zhinao": "360智腦",
"hunyuan": "騰訊混元",
"fireworks": "Fireworks",
"together": "Together",
"openai": "OpenAI",

View File

@ -22,7 +22,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 31,
version: 32,
blacklist: ['runtime'],
migrate
},

View File

@ -231,6 +231,15 @@ const initialState: LlmState = {
isSystem: true,
enabled: false
},
{
id: 'hunyuan',
name: 'hunyuan',
apiKey: '',
apiHost: 'https://api.hunyuan.cloud.tencent.com',
models: SYSTEM_MODELS.hunyuan,
isSystem: true,
enabled: false
},
{
id: 'nvidia',
name: 'nvidia',

View File

@ -477,6 +477,15 @@ const migrateConfig = {
isSystem: true,
enabled: false
},
{
id: 'hunyuan',
name: 'hunyuan',
apiKey: '',
apiHost: 'https://api.hunyuan.cloud.tencent.com',
models: SYSTEM_MODELS.hunyuan,
isSystem: true,
enabled: false
},
{
id: 'nvidia',
name: 'Nvidia',
@ -539,6 +548,26 @@ const migrateConfig = {
})
}
}
},
'32': (state: RootState) => {
return {
...state,
llm: {
...state.llm,
providers: [
...state.llm.providers,
{
id: 'hunyuan',
name: 'Hunyuan',
apiKey: '',
apiHost: 'https://api.hunyuan.cloud.tencent.com',
models: SYSTEM_MODELS.hunyuan,
isSystem: true,
enabled: false
}
]
}
}
}
}