feat: close #2303 add custom model name config

This commit is contained in:
Yidadaa
2023-07-09 18:15:52 +08:00
parent 28c457730a
commit 98ac7ee277
5 changed files with 59 additions and 27 deletions

View File

@@ -34,6 +34,7 @@ export const DEFAULT_CONFIG = {
dontShowMaskSplashScreen: false, // dont show splash screen when create chat
hideBuiltinMasks: false, // dont add builtin masks
customModels: "",
models: DEFAULT_MODELS as any as LLMModel[],
modelConfig: {
@@ -141,7 +142,7 @@ export const useAppConfig = create<ChatConfigStore>()(
}),
{
name: StoreKey.Config,
version: 3.4,
version: 3.5,
migrate(persistedState, version) {
const state = persistedState as ChatConfig;
@@ -156,6 +157,10 @@ export const useAppConfig = create<ChatConfigStore>()(
state.hideBuiltinMasks = false;
}
if (version < 3.5) {
state.customModels = "claude,claude-100k";
}
return state as any;
},
},