mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-29 16:35:19 -05:00
fix: background memory review saves memories from temporary chats (#34263)
With the background memory review on, Open WebUI looks back over the chat every few messages (10 by default) to save or update memories, and it did this in temporary chats too. Facts from a temporary chat could end up as memories that stayed after the chat was closed and showed up in later chats. The automatic review now skips temporary chats, so they leave no memories behind unless the user asks for one. Normal chats are reviewed as before, and memories already saved from a temporary chat are not removed. Fixes #34262
This commit is contained in:
1 parent
1cb829c2f6
commit
c557cf58aa
1 file changed
+1
-1
@@ -3896,7 +3896,7 @@ async def background_tasks_handler(ctx):
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
if messages:
|
||||
if messages and not is_temporary_chat_id(metadata.get('chat_id')):
|
||||
await review_memory_after_turn(
|
||||
request=request,
|
||||
user=user,
|
||||
|
||||
Reference in new issue
Block a user