Add Providers
1. Fix the naming error of the Grok model 2. Add new providers: Grok, Mistral, Jina, Hyperbolic
This commit is contained in:
parent
45dd76e281
commit
77a8b23d76
@ -44,8 +44,6 @@ import GemmaModelLogo from '@renderer/assets/images/models/gemma.png'
|
||||
import GemmaModelLogoDark from '@renderer/assets/images/models/gemma_dark.png'
|
||||
import GoogleModelLogo from '@renderer/assets/images/models/google.png'
|
||||
import GoogleModelLogoDark from '@renderer/assets/images/models/google.png'
|
||||
import GorkModelLogo from '@renderer/assets/images/models/gork.png'
|
||||
import GorkModelLogoDark from '@renderer/assets/images/models/gork_dark.png'
|
||||
import ChatGPT35ModelLogo from '@renderer/assets/images/models/gpt_3.5.png'
|
||||
import ChatGPT4ModelLogo from '@renderer/assets/images/models/gpt_4.png'
|
||||
import ChatGptModelLogoDakr from '@renderer/assets/images/models/gpt_dark.png'
|
||||
@ -53,6 +51,8 @@ import ChatGPT35ModelLogoDark from '@renderer/assets/images/models/gpt_dark.png'
|
||||
import ChatGPT4ModelLogoDark from '@renderer/assets/images/models/gpt_dark.png'
|
||||
import ChatGPTo1ModelLogoDark from '@renderer/assets/images/models/gpt_dark.png'
|
||||
import ChatGPTo1ModelLogo from '@renderer/assets/images/models/gpt_o1.png'
|
||||
import GrokModelLogo from '@renderer/assets/images/models/grok.png'
|
||||
import GrokModelLogoDark from '@renderer/assets/images/models/grok_dark.png'
|
||||
import GrypheModelLogo from '@renderer/assets/images/models/gryphe.png'
|
||||
import GrypheModelLogoDark from '@renderer/assets/images/models/gryphe_dark.png'
|
||||
import HailuoModelLogo from '@renderer/assets/images/models/hailuo.png'
|
||||
@ -65,6 +65,8 @@ import IbmModelLogo from '@renderer/assets/images/models/ibm.png'
|
||||
import IbmModelLogoDark from '@renderer/assets/images/models/ibm_dark.png'
|
||||
import InternlmModelLogo from '@renderer/assets/images/models/internlm.png'
|
||||
import InternlmModelLogoDark from '@renderer/assets/images/models/internlm_dark.png'
|
||||
import JinaModelLogo from '@renderer/assets/images/models/jina.png'
|
||||
import JinaModelLogoDark from '@renderer/assets/images/models/jina_dark.png'
|
||||
import KeLingModelLogo from '@renderer/assets/images/models/keling.png'
|
||||
import KeLingModelLogoDark from '@renderer/assets/images/models/keling_dark.png'
|
||||
import LlamaModelLogo from '@renderer/assets/images/models/llama.png'
|
||||
@ -154,6 +156,7 @@ export function getModelLogo(modelId: string) {
|
||||
}
|
||||
|
||||
const logoMap = {
|
||||
jina: isLight ? JinaModelLogo : JinaModelLogoDark,
|
||||
abab: isLight ? MinimaxModelLogo : MinimaxModelLogoDark,
|
||||
'o1-': isLight ? ChatGPTo1ModelLogo : ChatGPTo1ModelLogoDark,
|
||||
'gpt-3': isLight ? ChatGPT35ModelLogo : ChatGPT35ModelLogoDark,
|
||||
@ -197,7 +200,7 @@ export function getModelLogo(modelId: string) {
|
||||
dbrx: isLight ? DbrxModelLogo : DbrxModelLogo,
|
||||
flashaudio: isLight ? FlashaudioModelLogo : FlashaudioModelLogoDark,
|
||||
flux: isLight ? FluxModelLogo : FluxModelLogoDark,
|
||||
gork: isLight ? GorkModelLogo : GorkModelLogoDark,
|
||||
grok: isLight ? GrokModelLogo : GrokModelLogoDark,
|
||||
hunyuan: isLight ? HunyuanModelLogo : HunyuanModelLogoDark,
|
||||
internlm: isLight ? InternlmModelLogo : InternlmModelLogoDark,
|
||||
llava: isLight ? LLavaModelLogo : LLavaModelLogoDark,
|
||||
@ -764,6 +767,55 @@ export const SYSTEM_MODELS: Record<string, Model[]> = {
|
||||
group: 'abab5'
|
||||
}
|
||||
],
|
||||
hyperbolic: [
|
||||
{
|
||||
id: 'Qwen/Qwen2-VL-72B-Instruct',
|
||||
provider: 'hyperbolic',
|
||||
name: 'Qwen2-VL-72B-Instruct',
|
||||
group: 'Qwen2-VL'
|
||||
},
|
||||
{
|
||||
id: 'Qwen/Qwen2-VL-7B-Instruct',
|
||||
provider: 'hyperbolic',
|
||||
name: 'Qwen2-VL-7B-Instruct',
|
||||
group: 'Qwen2-VL'
|
||||
},
|
||||
{
|
||||
id: 'mistralai/Pixtral-12B-2409',
|
||||
provider: 'hyperbolic',
|
||||
name: 'Pixtral-12B-2409',
|
||||
group: 'Pixtral'
|
||||
},
|
||||
{
|
||||
id: 'meta-llama/Meta-Llama-3.1-405B',
|
||||
provider: 'hyperbolic',
|
||||
name: 'Meta-Llama-3.1-405B',
|
||||
group: 'Meta-Llama-3.1'
|
||||
}
|
||||
],
|
||||
grok: [
|
||||
{
|
||||
id: 'grok-beta',
|
||||
provider: 'grok',
|
||||
name: 'Grok Beta',
|
||||
group: 'Grok'
|
||||
}
|
||||
],
|
||||
mistral: [
|
||||
{
|
||||
id: 'pixtral-12b-2409',
|
||||
provider: 'mistral',
|
||||
name: 'Pixtral-12B-2409',
|
||||
group: 'Pixtral'
|
||||
},
|
||||
{
|
||||
id: 'open-mistral-nemo',
|
||||
provider: 'mistral',
|
||||
name: 'Open-Mistral-Nemo',
|
||||
group: 'Mistral'
|
||||
}
|
||||
],
|
||||
jina: [],
|
||||
aihubmix: [
|
||||
{
|
||||
id: 'gpt-4o-mini',
|
||||
|
||||
@ -24,6 +24,10 @@ import StepProviderLogo from '@renderer/assets/images/providers/step.png'
|
||||
import TogetherProviderLogo from '@renderer/assets/images/providers/together.png'
|
||||
import ZeroOneProviderLogo from '@renderer/assets/images/providers/zero-one.png'
|
||||
import ZhipuProviderLogo from '@renderer/assets/images/providers/zhipu.png'
|
||||
import GrokProviderLogo from '@renderer/assets/images/providers/grok.png'
|
||||
import HyperbolicProviderLogo from '@renderer/assets/images/providers/hyperbolic.png'
|
||||
import MistralProviderLogo from '@renderer/assets/images/providers/mistral.png'
|
||||
import JinaProviderLogo from '@renderer/assets/images/providers/jina.png'
|
||||
|
||||
export function getProviderLogo(providerId: string) {
|
||||
switch (providerId) {
|
||||
@ -79,6 +83,14 @@ export function getProviderLogo(providerId: string) {
|
||||
return AzureProviderLogo
|
||||
case 'hunyuan':
|
||||
return HunyuanProviderLogo
|
||||
case 'grok':
|
||||
return GrokProviderLogo
|
||||
case 'hyperbolic':
|
||||
return HyperbolicProviderLogo
|
||||
case 'mistral':
|
||||
return MistralProviderLogo
|
||||
case 'jina':
|
||||
return JinaProviderLogo
|
||||
default:
|
||||
return undefined
|
||||
}
|
||||
@ -298,6 +310,46 @@ export const PROVIDER_CONFIG = {
|
||||
models: 'https://docs.anthropic.com/en/docs/about-claude/models'
|
||||
}
|
||||
},
|
||||
grok: {
|
||||
api: {
|
||||
url: 'https://api.x.ai'
|
||||
},
|
||||
websites: {
|
||||
official: 'https://x.ai/',
|
||||
docs: 'https://docs.x.ai/',
|
||||
models: 'https://docs.x.ai/docs#getting-started'
|
||||
}
|
||||
},
|
||||
hyperbolic: {
|
||||
api: {
|
||||
url: 'https://api.hyperbolic.xyz'
|
||||
},
|
||||
websites: {
|
||||
official: 'https://app.hyperbolic.xyz',
|
||||
docs: 'https://docs.hyperbolic.xyz',
|
||||
models: 'https://app.hyperbolic.xyz/models'
|
||||
}
|
||||
},
|
||||
mistral: {
|
||||
api: {
|
||||
url: 'https://api.mistral.ai'
|
||||
},
|
||||
websites: {
|
||||
official: 'https://mistral.ai',
|
||||
docs: 'https://docs.mistral.ai',
|
||||
models: 'https://docs.mistral.ai/getting-started/models/models_overview'
|
||||
}
|
||||
},
|
||||
jina: {
|
||||
api: {
|
||||
url: 'https://api.jina.ai'
|
||||
},
|
||||
websites: {
|
||||
official: 'https://jina.ai',
|
||||
docs: 'https://jina.ai',
|
||||
models: 'https://jina.ai'
|
||||
}
|
||||
},
|
||||
aihubmix: {
|
||||
api: {
|
||||
url: 'https://aihubmix.com'
|
||||
|
||||
@ -215,6 +215,10 @@
|
||||
"locate.message": "Locate the message"
|
||||
},
|
||||
"provider": {
|
||||
"jina": "Jina",
|
||||
"mistral": "Mistral",
|
||||
"hyperbolic": "Hyperbolic",
|
||||
"grok": "Grok",
|
||||
"nvidia": "Nvidia",
|
||||
"hunyuan": "Tencent Hunyuan",
|
||||
"zhinao": "360AI",
|
||||
|
||||
@ -215,6 +215,10 @@
|
||||
"locate.message": "定位到消息"
|
||||
},
|
||||
"provider": {
|
||||
"jina": "Jina",
|
||||
"mistral": "Mistral",
|
||||
"hyperbolic": "Hyperbolic",
|
||||
"grok": "Grok",
|
||||
"nvidia": "英伟达",
|
||||
"hunyuan": "腾讯混元",
|
||||
"zhinao": "360智脑",
|
||||
|
||||
@ -215,6 +215,10 @@
|
||||
"locate.message": "定位到訊息"
|
||||
},
|
||||
"provider": {
|
||||
"jina": "Jina",
|
||||
"mistral": "Mistral",
|
||||
"hyperbolic": "Hyperbolic",
|
||||
"grok": "Grok",
|
||||
"nvidia": "輝達",
|
||||
"zhinao": "360智腦",
|
||||
"hunyuan": "騰訊混元",
|
||||
|
||||
@ -24,7 +24,7 @@ const persistedReducer = persistReducer(
|
||||
{
|
||||
key: 'cherry-studio',
|
||||
storage,
|
||||
version: 37,
|
||||
version: 38,
|
||||
blacklist: ['runtime'],
|
||||
migrate
|
||||
},
|
||||
|
||||
@ -249,6 +249,42 @@ const initialState: LlmState = {
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'grok',
|
||||
name: 'Grok',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.x.ai',
|
||||
models: SYSTEM_MODELS.grok,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'hyperbolic',
|
||||
name: 'Hyperbolic',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.hyperbolic.xyz',
|
||||
models: SYSTEM_MODELS.hyperbolic,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'mistral',
|
||||
name: 'Mistral',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.mistral.ai',
|
||||
models: SYSTEM_MODELS.mistral,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'jina',
|
||||
name: 'Jina',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.jina.ai',
|
||||
models: SYSTEM_MODELS.jina,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'aihubmix',
|
||||
name: 'AiHubMix',
|
||||
|
||||
@ -622,6 +622,53 @@ const migrateConfig = {
|
||||
'37': (state: RootState) => {
|
||||
state.settings.messageStyle = 'plain'
|
||||
return state
|
||||
},
|
||||
'38': (state: RootState) => {
|
||||
return {
|
||||
...state,
|
||||
llm: {
|
||||
...state.llm,
|
||||
providers: [
|
||||
...state.llm.providers,
|
||||
{
|
||||
id: 'grok',
|
||||
name: 'Grok',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.x.ai',
|
||||
models: SYSTEM_MODELS.grok,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'hyperbolic',
|
||||
name: 'Hyperbolic',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.hyperbolic.xyz',
|
||||
models: SYSTEM_MODELS.hyperbolic,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'mistral',
|
||||
name: 'Mistral',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.mistral.ai',
|
||||
models: SYSTEM_MODELS.mistral,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'jina',
|
||||
name: 'Jina',
|
||||
apiKey: '',
|
||||
apiHost: 'https://api.jina.ai',
|
||||
models: SYSTEM_MODELS.jina,
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user