mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 22:10:21 +08:00
chore: update store migration and LLM providers
This commit is contained in:
parent
f0b5a75387
commit
5784f5bbd5
@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
|
|||||||
{
|
{
|
||||||
key: 'cherry-studio',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 65,
|
version: 66,
|
||||||
blacklist: ['runtime'],
|
blacklist: ['runtime'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -43,16 +43,6 @@ const initialState: LlmState = {
|
|||||||
isSystem: true,
|
isSystem: true,
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'gitee-ai',
|
|
||||||
name: 'gitee ai',
|
|
||||||
type: 'openai',
|
|
||||||
apiKey: '',
|
|
||||||
apiHost: 'https://ai.gitee.com',
|
|
||||||
models: SYSTEM_MODELS['gitee-ai'],
|
|
||||||
isSystem: true,
|
|
||||||
enabled: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'deepseek',
|
id: 'deepseek',
|
||||||
name: 'deepseek',
|
name: 'deepseek',
|
||||||
@ -63,16 +53,6 @@ const initialState: LlmState = {
|
|||||||
isSystem: true,
|
isSystem: true,
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'ppio',
|
|
||||||
name: 'PPIO',
|
|
||||||
type: 'openai',
|
|
||||||
apiKey: '',
|
|
||||||
apiHost: 'https://api.ppinfra.com/v3/openai',
|
|
||||||
models: SYSTEM_MODELS.ppio,
|
|
||||||
isSystem: true,
|
|
||||||
enabled: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'ocoolai',
|
id: 'ocoolai',
|
||||||
name: 'ocoolAI',
|
name: 'ocoolAI',
|
||||||
@ -234,16 +214,6 @@ const initialState: LlmState = {
|
|||||||
isSystem: true,
|
isSystem: true,
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'graphrag-kylin-mountain',
|
|
||||||
name: 'GraphRAG',
|
|
||||||
type: 'openai',
|
|
||||||
apiKey: '',
|
|
||||||
apiHost: '',
|
|
||||||
models: [],
|
|
||||||
isSystem: true,
|
|
||||||
enabled: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'openrouter',
|
id: 'openrouter',
|
||||||
name: 'OpenRouter',
|
name: 'OpenRouter',
|
||||||
@ -353,6 +323,26 @@ const initialState: LlmState = {
|
|||||||
models: SYSTEM_MODELS.jina,
|
models: SYSTEM_MODELS.jina,
|
||||||
isSystem: true,
|
isSystem: true,
|
||||||
enabled: false
|
enabled: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'gitee-ai',
|
||||||
|
name: 'gitee ai',
|
||||||
|
type: 'openai',
|
||||||
|
apiKey: '',
|
||||||
|
apiHost: 'https://ai.gitee.com',
|
||||||
|
models: SYSTEM_MODELS['gitee-ai'],
|
||||||
|
isSystem: true,
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ppio',
|
||||||
|
name: 'PPIO',
|
||||||
|
type: 'openai',
|
||||||
|
apiKey: '',
|
||||||
|
apiHost: 'https://api.ppinfra.com/v3/openai',
|
||||||
|
models: SYSTEM_MODELS.ppio,
|
||||||
|
isSystem: true,
|
||||||
|
enabled: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
|
|||||||
@ -925,6 +925,32 @@ const migrateConfig = {
|
|||||||
'65': (state: RootState) => {
|
'65': (state: RootState) => {
|
||||||
state.settings.targetLanguage = 'english'
|
state.settings.targetLanguage = 'english'
|
||||||
return state
|
return state
|
||||||
|
},
|
||||||
|
'66': (state: RootState) => {
|
||||||
|
state.llm.providers.push(
|
||||||
|
{
|
||||||
|
id: 'gitee-ai',
|
||||||
|
name: 'gitee ai',
|
||||||
|
type: 'openai',
|
||||||
|
apiKey: '',
|
||||||
|
apiHost: 'https://ai.gitee.com',
|
||||||
|
models: SYSTEM_MODELS['gitee-ai'],
|
||||||
|
isSystem: true,
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ppio',
|
||||||
|
name: 'PPIO',
|
||||||
|
type: 'openai',
|
||||||
|
apiKey: '',
|
||||||
|
apiHost: 'https://api.ppinfra.com/v3/openai',
|
||||||
|
models: SYSTEM_MODELS.ppio,
|
||||||
|
isSystem: true,
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
state.llm.providers = state.llm.providers.filter((provider) => provider.id !== 'graphrag-kylin-mountain')
|
||||||
|
return state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user