dev: 增加模型设置项:是否启用注入全局 System Prompt 功能

This commit is contained in:
imldy
2023-07-10 18:56:22 +08:00
parent c7e9f13d2e
commit 5e361f6748
3 changed files with 26 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ export const DEFAULT_CONFIG = {
sendMemory: true,
historyMessageCount: 4,
compressMessageLengthThreshold: 1000,
enableInjectSystemPrompts: true,
template: DEFAULT_INPUT_TEMPLATE,
},
};
@@ -146,7 +147,7 @@ export const useAppConfig = create<ChatConfigStore>()(
}),
{
name: StoreKey.Config,
version: 3.5,
version: 3.6,
migrate(persistedState, version) {
const state = persistedState as ChatConfig;
@@ -165,6 +166,10 @@ export const useAppConfig = create<ChatConfigStore>()(
state.customModels = "claude,claude-100k";
}
if (version < 3.6) {
state.modelConfig.enableInjectSystemPrompts = true;
}
return state as any;
},
},