Skip to content

Commit f994200

Browse files
authored
fix: merge ai config properly
1 parent c70a299 commit f994200

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

packages/ai/src/configure.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,5 @@ export function getAIConfig(): Required<ConfigureAI> {
168168
* @param config The configuration options for the AI plugin.
169169
*/
170170
export function configureAI(config: ConfigureAI): void {
171-
if (config.messageFilter) {
172-
AIConfig.messageFilter = config.messageFilter;
173-
}
174-
175-
if (config.selectAiModel) {
176-
AIConfig.selectAiModel = config.selectAiModel;
177-
}
178-
179-
if (config.prepareSystemPrompt) {
180-
AIConfig.prepareSystemPrompt = config.prepareSystemPrompt;
181-
}
182-
183-
if (config.preparePrompt) {
184-
AIConfig.preparePrompt = config.preparePrompt;
185-
}
171+
Object.assign(AIConfig, config);
186172
}

0 commit comments

Comments
 (0)