From 79ce6e0a3f17dae644b591416ba617f531c892be Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 30 Dec 2024 11:29:18 -0800 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 4741623c4..baaacb2d4 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -750,7 +750,7 @@ async def process_chat_response( ): async def background_tasks_handler(): message_map = Chats.get_messages_by_chat_id(metadata["chat_id"]) - message = message_map.get(metadata["message_id"]) + message = message_map.get(metadata["message_id"]) if message_map else None if message: messages = get_message_list(message_map, message.get("id"))