浏览代码

fix: migrate modelConfig state

PaRaD1SE98 1 年之前
父节点
当前提交
f4c99c9cf7
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/store/config.ts

+ 3 - 2
app/store/config.ts

@@ -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;