langchain
langchain copied to clipboard
Keeping chat session ids with chatbot agents
First off kudos for this remarkable library!
I'm experimenting with chatbot agents, but missing how can I save a specific conversation sessions and context per user. The issue is that if I deploy this and serve to multiple users, the context gets confused. Any suggestions?
@assafelovic - did you find any workaround for this ?
I guess you would need a memory class which stores the chat memory in a database of some sort with a session id and retrieve it from there when a request arrives related to that chat session. As far as I see, this PR was trying to achieve something similar with the DynamoDB as database backend.
I was actually thinking to implement something like this for Redis as database backend, but I will ask @hwchase17 first, as we might want to do that a bit more generalized (like not calling it "serverless", as the backend isn't always serverless).
Here is an initial implementation for this: https://github.com/hwchase17/langchain/pull/1058#issuecomment-1478775638
This has been added recently in v0.0.126, see https://github.com/hwchase17/langchain/pull/2122
Hi, @assafelovic! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, the issue you raised was about saving conversation sessions and context per user in a chatbot agent. There were some suggestions made by other users, such as using a memory class to store chat memory in a database with a session ID, and a PR that attempted to achieve something similar using DynamoDB as the database backend.
However, I wanted to inform you that this feature has been resolved in version 0.0.126 of the repository. The LangChain team has added the capability to save conversation sessions and context per user.
If you believe that this issue is still relevant to the latest version of the LangChain repository, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your contribution to the LangChain project!