Browse Source

refac/fix: memory

Timothy Jaeryang Baek 4 weeks ago
parent
commit
4c45d67677
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/utils/middleware.py

+ 1 - 1
backend/open_webui/utils/middleware.py

@@ -302,7 +302,7 @@ async def chat_memory_handler(
     results = await query_memory(
         request,
         QueryMemoryForm(
-            **{"content": get_last_user_message(form_data["messages"]), "k": 3}
+            **{"content": get_last_user_message(form_data["messages"]) or "", "k": 3}
         ),
         user,
     )