From 877bc23afc2d0f6279ee9428a2efb388715680ea Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 21 Mar 2026 18:42:55 -0500 Subject: [PATCH] refac --- backend/open_webui/utils/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index cae2ceed67..d377446249 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -2884,7 +2884,7 @@ async def background_tasks_handler(ctx): } ) - if title == None and len(messages) == 2: + if title == None and len(messages) == 2 and (not messages_map or len(messages_map) <= 2): title = messages[0].get('content', user_message) Chats.update_chat_title_by_id(metadata['chat_id'], title)