mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat: add system prompt customization options in SDK and CLI
This commit is contained in:
parent
110fcd7b7b
commit
ee33a3c35e
17 changed files with 529 additions and 14 deletions
|
|
@ -298,6 +298,8 @@ export interface ConfigParameters {
|
|||
debugMode: boolean;
|
||||
includePartialMessages?: boolean;
|
||||
question?: string;
|
||||
systemPrompt?: string;
|
||||
appendSystemPrompt?: string;
|
||||
coreTools?: string[];
|
||||
allowedTools?: string[];
|
||||
excludeTools?: string[];
|
||||
|
|
@ -451,6 +453,8 @@ export class Config {
|
|||
private readonly outputFormat: OutputFormat;
|
||||
private readonly includePartialMessages: boolean;
|
||||
private readonly question: string | undefined;
|
||||
private readonly systemPrompt: string | undefined;
|
||||
private readonly appendSystemPrompt: string | undefined;
|
||||
private readonly coreTools: string[] | undefined;
|
||||
private readonly allowedTools: string[] | undefined;
|
||||
private readonly excludeTools: string[] | undefined;
|
||||
|
|
@ -561,6 +565,8 @@ export class Config {
|
|||
this.outputFormat = normalizedOutputFormat ?? OutputFormat.TEXT;
|
||||
this.includePartialMessages = params.includePartialMessages ?? false;
|
||||
this.question = params.question;
|
||||
this.systemPrompt = params.systemPrompt;
|
||||
this.appendSystemPrompt = params.appendSystemPrompt;
|
||||
this.coreTools = params.coreTools;
|
||||
this.allowedTools = params.allowedTools;
|
||||
this.excludeTools = params.excludeTools;
|
||||
|
|
@ -1208,6 +1214,14 @@ export class Config {
|
|||
return this.question;
|
||||
}
|
||||
|
||||
getSystemPrompt(): string | undefined {
|
||||
return this.systemPrompt;
|
||||
}
|
||||
|
||||
getAppendSystemPrompt(): string | undefined {
|
||||
return this.appendSystemPrompt;
|
||||
}
|
||||
|
||||
getCoreTools(): string[] | undefined {
|
||||
return this.coreTools;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue