From 6b5c7f102b34b30c749d016c9353ee1886b6849c Mon Sep 17 00:00:00 2001 From: fujie Date: Mon, 23 Mar 2026 19:20:44 +0800 Subject: [PATCH] fix(infographic): refine prompt with explicit English fallback on ambiguous content --- plugins/actions/infographic/infographic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/actions/infographic/infographic.py b/plugins/actions/infographic/infographic.py index 407d8f2..2d4d01c 100644 --- a/plugins/actions/infographic/infographic.py +++ b/plugins/actions/infographic/infographic.py @@ -507,6 +507,7 @@ You are a professional infographic design expert who can analyze user-provided t ## Important Language Rule - **GENERATE CONTENT IN INPUT LANGUAGE**: You must generate the text content of the infographic in the **exact same language** as the user's input content (the text you are analyzing). - **Format Consistency**: Even if this system prompt is in English, if the user input is in Chinese, the infographic content must be in Chinese. If input is Japanese, output Japanese. +- **If Unsure**: If the language is ambiguous, mixed, or cannot be clearly determined from the context, default to **English** for the infographic content. ## Infographic Syntax Specification @@ -784,7 +785,7 @@ OpenWebUI Theme: {user_theme} Please select the most appropriate infographic template based on text characteristics and output standard infographic syntax. Pay attention to correct indentation format (two spaces). ⚠️ **Language Consistency Rule (CRITICAL)**: -The title, desc, labels, and text items in your output **MUST STRICTLY MATCH the primary language of the original {long_text_content}**. Do NOT translate the content just to match default status parameters. Everything should follow the input flow natively. +The title, desc, labels, and text items in your output **MUST STRICTLY MATCH the primary language of the original {long_text_content}**. Do NOT translate the content just to match default status parameters. If the language is ambiguous or mixed, default to **English** for output content nodes. **Visual Optimization Guide (MUST FOLLOW):** - **Point-based Generation:** Infographics are not articles. Extract KEYWORDS ONLY, avoid complete sentences.