Skip to content

Commit 50d3c92

Browse files
committed
refac
1 parent e8b4c7f commit 50d3c92

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

backend/open_webui/config.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,24 +2148,23 @@ class BannerModel(BaseModel):
21482148
TITLE_GENERATION_PROMPT_TEMPLATE = os.getenv('TITLE_GENERATION_PROMPT_TEMPLATE', '')
21492149

21502150
DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE = """### Task:
2151-
Generate a concise, 3-5 word title with an emoji summarizing the chat history.
2151+
Generate a concise title summarizing the chat history.
21522152
### Guidelines:
21532153
- The title should clearly represent the main theme or subject of the conversation.
2154-
- Use emojis that enhance understanding of the topic, but avoid quotation marks or special formatting.
2154+
- Keep it short: 2-4 words is best.
2155+
- Do not use emojis, quotation marks, or special formatting.
21552156
- Write the title in the chat's primary language; default to English if multilingual.
2156-
- Prioritize accuracy over excessive creativity; keep it clear and simple.
2157+
- Prioritize accuracy over creativity.
21572158
- Your entire response must consist solely of the JSON object, without any introductory or concluding text.
21582159
- The output must be a single, raw JSON object, without any markdown code fences or other encapsulating text.
21592160
- Ensure no conversational text, affirmations, or explanations precede or follow the raw JSON output, as this will cause direct parsing failure.
21602161
### Output:
21612162
JSON format: { "title": "your concise title here" }
21622163
### Examples:
2163-
- { "title": "📉 Stock Market Trends" },
2164-
- { "title": "🍪 Perfect Chocolate Chip Recipe" },
2165-
- { "title": "Evolution of Music Streaming" },
2166-
- { "title": "Remote Work Productivity Tips" },
2167-
- { "title": "Artificial Intelligence in Healthcare" },
2168-
- { "title": "🎮 Video Game Development Insights" }
2164+
- { "title": "Stock Trends" },
2165+
- { "title": "Chocolate Chip Cookies" },
2166+
- { "title": "Music Streaming" },
2167+
- { "title": "Remote Work" }
21692168
### Chat History:
21702169
<chat_history>
21712170
{{MESSAGES:END:2}}

0 commit comments

Comments
 (0)