diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 9b39579d6..6dd7a5079 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1570,12 +1570,15 @@ async def generate_chat_tags(form_data: dict, user=Depends(get_verified_user)): task_model_id = get_task_model_id(model_id) print(task_model_id) - template = """### Task: -Generate 1-3 broad tags categorizing the main themes of the chat history. + if app.state.config.TAGS_GENERATION_PROMPT_TEMPLATE != "": + template = app.state.config.TAGS_GENERATION_PROMPT_TEMPLATE + else: + template = """### Task: +Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags. ### Guidelines: - Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education) -- Only add more specific subdomains if they are strongly represented throughout the conversation +- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation - If content is too short (less than 3 messages) or too diverse, use only ["General"] - Use the chat's primary language; default to English if multilingual - Prioritize accuracy over specificity diff --git a/src/lib/components/common/Badge.svelte b/src/lib/components/common/Badge.svelte index 47b134b61..12ad872c5 100644 --- a/src/lib/components/common/Badge.svelte +++ b/src/lib/components/common/Badge.svelte @@ -7,7 +7,7 @@ success: 'bg-green-500/20 text-green-700 dark:text-green-200', warning: 'bg-yellow-500/20 text-yellow-700 dark:text-yellow-200', error: 'bg-red-500/20 text-red-700 dark:text-red-200', - mute: 'bg-gray-500/20 text-gray-700 dark:text-gray-200' + muted: 'bg-gray-500/20 text-gray-700 dark:text-gray-200' }; diff --git a/src/lib/components/common/Tags/TagList.svelte b/src/lib/components/common/Tags/TagList.svelte index f1a23f6dc..1ce5b3469 100644 --- a/src/lib/components/common/Tags/TagList.svelte +++ b/src/lib/components/common/Tags/TagList.svelte @@ -1,34 +1,32 @@ {#each tags as tag} -
-
- {tag.name} -
- -
+
+ {tag.name} +
+ + + {/each} diff --git a/src/lib/components/layout/Navbar/Menu.svelte b/src/lib/components/layout/Navbar/Menu.svelte index 079976dcf..67ac9dcb2 100644 --- a/src/lib/components/layout/Navbar/Menu.svelte +++ b/src/lib/components/layout/Navbar/Menu.svelte @@ -274,7 +274,7 @@ {#if !$temporaryChatEnabled} -
+
diff --git a/src/lib/components/layout/Sidebar/ChatMenu.svelte b/src/lib/components/layout/Sidebar/ChatMenu.svelte index 9ed152e67..2bb2dbbfe 100644 --- a/src/lib/components/layout/Sidebar/ChatMenu.svelte +++ b/src/lib/components/layout/Sidebar/ChatMenu.svelte @@ -134,7 +134,7 @@
{$i18n.t('Delete')}
-
+
{#if item?.meta?.document} - + {:else} {/if}