From 0654df7bdb2c21cf6e0e694307d0ea3b135dda77 Mon Sep 17 00:00:00 2001 From: Tim Baek Date: Wed, 7 Jan 2026 10:25:13 -0500 Subject: [PATCH] refac --- backend/open_webui/utils/tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 75b2b9aea..3bdb6d0cc 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -365,9 +365,6 @@ def get_builtin_tools( # Time utilities - always available for date calculations builtin_functions.extend([get_current_timestamp, calculate_timestamp]) - # Chats tools - search and fetch user's chat history - builtin_functions.extend([search_chats, view_chat]) - # Knowledge base tools - conditional injection based on model knowledge # If model has attached knowledge (any type), only provide query_knowledge_bases # Otherwise, provide all KB browsing tools @@ -381,6 +378,9 @@ def get_builtin_tools( [list_knowledge_bases, search_knowledge_bases, search_knowledge_files, view_knowledge_file, query_knowledge_bases] ) + # Chats tools - search and fetch user's chat history + builtin_functions.extend([search_chats, view_chat]) + # Add memory tools if enabled for this chat if features.get("memory"): builtin_functions.extend([search_memories, add_memory, replace_memory_content])