refac: title generation

This commit is contained in:
Timothy J. Baek
2024-06-09 14:25:31 -07:00
parent 84defafc14
commit 5e7237b9cb
8 changed files with 267 additions and 124 deletions

View File

@@ -618,6 +618,27 @@ ADMIN_EMAIL = PersistentConfig(
)
TITLE_GENERATION_PROMPT_TEMPLATE = PersistentConfig(
"TITLE_GENERATION_PROMPT_TEMPLATE",
"task.title.prompt_template",
os.environ.get(
"TITLE_GENERATION_PROMPT_TEMPLATE",
"""Here is the query:
{{prompt:middletruncate:8000}}
Create a concise, 3-5 word phrase with an emoji as a title for the previous query. Suitable Emojis for the summary can be used to enhance understanding but avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT.
Examples of titles:
📉 Stock Market Trends
🍪 Perfect Chocolate Chip Recipe
Evolution of Music Streaming
Remote Work Productivity Tips
Artificial Intelligence in Healthcare
🎮 Video Game Development Insights""",
),
)
####################################
# WEBUI_SECRET_KEY
####################################