feat: 支持全局配置插件

This commit is contained in:
Hk-Gosuto
2023-08-16 13:38:15 +08:00
parent dd0b451a7c
commit 76eb2afd06
11 changed files with 147 additions and 8 deletions

View File

@@ -51,6 +51,12 @@ export const DEFAULT_CONFIG = {
enableInjectSystemPrompts: true,
template: DEFAULT_INPUT_TEMPLATE,
},
pluginConfig: {
enable: true,
maxIterations: 3,
returnIntermediateSteps: true,
},
};
export type ChatConfig = typeof DEFAULT_CONFIG;
@@ -63,6 +69,7 @@ export type ChatConfigStore = ChatConfig & {
};
export type ModelConfig = ChatConfig["modelConfig"];
export type PluginConfig = ChatConfig["pluginConfig"];
export function limitNumber(
x: number,