diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index 1ff62af369..6e5ad30201 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -58,7 +58,7 @@ def chat_search_content_query(text: str) -> str: def chat_search_terms(text: str) -> list[str]: - return list(dict.fromkeys(re.findall(r'[a-z0-9]+', text.lower()))) + return list(dict.fromkeys(re.findall(r'[a-z0-9]+', text.lower())))[:12] def chat_message_list(chat: dict) -> list: