chore(migration): update version and adjust provider type for QwenLM #833
- Incremented version from 60 to 61 in the persisted reducer configuration. - Updated migration logic to change the provider type for 'qwenlm' from 'openai' to 'qwenlm', ensuring correct identification in the state management.
This commit is contained in:
parent
e07d4838a9
commit
ad9fefe902
@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
|
|||||||
{
|
{
|
||||||
key: 'cherry-studio',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 60,
|
version: 61,
|
||||||
blacklist: ['runtime'],
|
blacklist: ['runtime'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -814,7 +814,7 @@ const migrateConfig = {
|
|||||||
state.llm.providers.push({
|
state.llm.providers.push({
|
||||||
id: 'qwenlm',
|
id: 'qwenlm',
|
||||||
name: 'QwenLM',
|
name: 'QwenLM',
|
||||||
type: 'openai',
|
type: 'qwenlm',
|
||||||
apiKey: '',
|
apiKey: '',
|
||||||
apiHost: 'https://chat.qwenlm.ai/api/',
|
apiHost: 'https://chat.qwenlm.ai/api/',
|
||||||
models: SYSTEM_MODELS.qwenlm,
|
models: SYSTEM_MODELS.qwenlm,
|
||||||
@ -881,6 +881,14 @@ const migrateConfig = {
|
|||||||
'60': (state: RootState) => {
|
'60': (state: RootState) => {
|
||||||
state.settings.multiModelMessageStyle = 'fold'
|
state.settings.multiModelMessageStyle = 'fold'
|
||||||
return state
|
return state
|
||||||
|
},
|
||||||
|
'61': (state: RootState) => {
|
||||||
|
state.llm.providers.forEach((provider) => {
|
||||||
|
if (provider.id === 'qwenlm') {
|
||||||
|
provider.type = 'qwenlm'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user