fix(core): Adjust chat hub system prompt to avoid claiming it can generate images (no-changelog) (#22932)

This commit is contained in:
Jaakko Husso
2025-12-08 21:59:20 +02:00
committed by GitHub
parent d710895dc0
commit a77cf97d48
2 changed files with 9 additions and 3 deletions
@@ -474,11 +474,17 @@ export class ChatHubWorkflowService {
});
return `The user's current local date and time is: ${now} (timezone: ${timeZone}).
When you need to reference “now”, use this date and time.`;
When you need to reference "now", use this date and time.
You can only produce text responses.
You cannot create, generate, edit, or display images, videos, or other non-text content.
If the user asks you to generate or edit an image (or other media), explain that you are not able to do that and, if helpful, describe in words what the image could look like or how they could create it using external tools.`;
}
private getBaseSystemMessage(timeZone: string) {
return 'You are a helpful assistant.\n' + this.getSystemMessageMetadata(timeZone);
return `You are a helpful assistant.
${this.getSystemMessageMetadata(timeZone)}`;
}
private buildToolsAgentNode(
@@ -499,7 +499,7 @@ export class ChatHubService {
}
const systemMessage =
agent.systemPrompt + '\n' + this.chatHubWorkflowService.getSystemMessageMetadata(timeZone);
agent.systemPrompt + '\n\n' + this.chatHubWorkflowService.getSystemMessageMetadata(timeZone);
const model: ChatHubBaseLLMModel = {
provider: agent.provider,