mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-24 23:22:38 +08:00
fix(core): Adjust chat hub system prompt to avoid claiming it can generate images (no-changelog) (#22932)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user