Memory not clearing
Bug Description
Memory is not clearing even though I clear it..
Reproduction
- Click on Playground
- Delete memory
- Run "Prompt" component that is connected to "Chat Memory" component
- Click on "Prompt Message" to see that chat memory has not been cleared. In fact, it contains memory from other flows.
See reproduction process here https://www.loom.com/share/799406c9b05c4aa7a2a6095e037d2ff1
Expected behavior
Expected to see no chat history in Prompt Message. Especially not from other flows.
Who can help?
No response
Operating System
Mac OS
Langflow Version
1.0.19.post2
Python Version
3.10
Screenshot
https://www.loom.com/share/799406c9b05c4aa7a2a6095e037d2ff1
Flow File
No response
The issue you're experiencing with the memory not clearing in Langflow might be related to how session management and memory isolation are implemented. In Langflow, memory is managed using session IDs, which are supposed to ensure that each session is distinct and isolated. The Delete memory function is implemented through the delete_messages function, which deletes messages based on the session ID [1].
If the memory is not clearing as expected, it could be due to the session ID not being correctly managed or updated, leading to memory from other flows being retained. Here are a few things you might want to check or try:
-
Session ID Management: Ensure that the session ID is correctly set and unique for each flow. If the session ID is not being updated or is shared across flows, it could lead to memory overlap.
-
Clear Method: Verify that the
clearmethod in theLCBuiltinChatMemoryclass is being called correctly and that it is executing thedelete_messagesfunction with the correct session ID. -
Logging and Error Handling: Check the logs for any errors or warnings that might indicate issues with the memory clearing process. Langflow uses logging to capture such events, which can help diagnose the problem [2][3].
If these steps do not resolve the issue, it might require a deeper investigation into how session IDs are being generated and managed in your specific setup.
To continue talking to Dosu, mention @dosu.
@SavvySupport Did you try using version v1.1.0?
Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to help you.