chore: update store migration and LLM providers
This commit is contained in:
parent
1b3ae92854
commit
635e125ef4
@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
|
||||
{
|
||||
key: 'cherry-studio',
|
||||
storage,
|
||||
version: 65,
|
||||
version: 66,
|
||||
blacklist: ['runtime'],
|
||||
migrate
|
||||
},
|
||||
|
||||
@ -43,16 +43,6 @@ const initialState: LlmState = {
|
||||
isSystem: true,
|
||||
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',
|
||||
name: 'deepseek',
|
||||
@ -63,16 +53,6 @@ const initialState: LlmState = {
|
||||
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
|
||||
},
|
||||
{
|
||||
id: 'ocoolai',
|
||||
name: 'ocoolAI',
|
||||
@ -234,16 +214,6 @@ const initialState: LlmState = {
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'graphrag-kylin-mountain',
|
||||
name: 'GraphRAG',
|
||||
type: 'openai',
|
||||
apiKey: '',
|
||||
apiHost: '',
|
||||
models: [],
|
||||
isSystem: true,
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'openrouter',
|
||||
name: 'OpenRouter',
|
||||
@ -353,6 +323,26 @@ const initialState: LlmState = {
|
||||
models: SYSTEM_MODELS.jina,
|
||||
isSystem: true,
|
||||
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: {
|
||||
|
||||
@ -925,6 +925,32 @@ const migrateConfig = {
|
||||
'65': (state: RootState) => {
|
||||
state.settings.targetLanguage = 'english'
|
||||
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…
x
Reference in New Issue
Block a user