From 50d3c927bfed3b8dd94fd9f79bff258a84ecbd92 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 14 Jul 2026 17:34:00 -0400 Subject: [PATCH] refac --- backend/open_webui/config.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index 43f0b01993..fceedd0a87 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -2148,24 +2148,23 @@ CONTEXT_COMPACTION_PROMPT_TEMPLATE = os.getenv('CONTEXT_COMPACTION_PROMPT_TEMPLA TITLE_GENERATION_PROMPT_TEMPLATE = os.getenv('TITLE_GENERATION_PROMPT_TEMPLATE', '') DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE = """### Task: -Generate a concise, 3-5 word title with an emoji summarizing the chat history. +Generate a concise title summarizing the chat history. ### Guidelines: - The title should clearly represent the main theme or subject of the conversation. -- Use emojis that enhance understanding of the topic, but avoid quotation marks or special formatting. +- Keep it short: 2-4 words is best. +- Do not use emojis, quotation marks, or special formatting. - Write the title in the chat's primary language; default to English if multilingual. -- Prioritize accuracy over excessive creativity; keep it clear and simple. +- Prioritize accuracy over creativity. - Your entire response must consist solely of the JSON object, without any introductory or concluding text. - The output must be a single, raw JSON object, without any markdown code fences or other encapsulating text. - Ensure no conversational text, affirmations, or explanations precede or follow the raw JSON output, as this will cause direct parsing failure. ### Output: JSON format: { "title": "your concise title here" } ### Examples: -- { "title": "📉 Stock Market Trends" }, -- { "title": "🍪 Perfect Chocolate Chip Recipe" }, -- { "title": "Evolution of Music Streaming" }, -- { "title": "Remote Work Productivity Tips" }, -- { "title": "Artificial Intelligence in Healthcare" }, -- { "title": "🎮 Video Game Development Insights" } +- { "title": "Stock Trends" }, +- { "title": "Chocolate Chip Cookies" }, +- { "title": "Music Streaming" }, +- { "title": "Remote Work" } ### Chat History: {{MESSAGES:END:2}}