Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2092 from PaRaD1SE98/main
Browse files Browse the repository at this point in the history
fix: migrate modelConfig state
  • Loading branch information
Yidadaa authored Jun 22, 2023
2 parents 57447c2 + f4c99c9 commit ad1fe87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ export const useAppConfig = create<ChatConfigStore>()(
}),
{
name: StoreKey.Config,
version: 2,
version: 3,
migrate(persistedState, version) {
if (version === 2) return persistedState as any;
if (version === 3) return persistedState as any;

const state = persistedState as ChatConfig;
state.modelConfig.sendMemory = true;
state.modelConfig.historyMessageCount = 4;
state.modelConfig.compressMessageLengthThreshold = 1000;
state.modelConfig.frequency_penalty = 0;
state.dontShowMaskSplashScreen = false;

return state;
Expand Down

0 comments on commit ad1fe87

Please sign in to comment.