How to add memory/persistance in a streamlit app? #251
Replies: 1 comment
-
Clearly Jupyter notebooks are not the right UI for actually deploying an application to the non-technical world. I just finished a streamlit-langgchain app which uses persistence although it is not chat based. Mating the two state machines is tricky but doable. The code ihere and the streamlit app can be run from the streamlit cloud here. Note that I did have to add a classmethod to SqliteServer as below so that Streamlit's multiple threads would be tolerated.
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone
I was following this example: https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/multi-agent-collaboration.ipynb
And I know one can add "persistance" to the LLM so it remembers the questions previously asked. However, when adding to a streamlit app, the state of this connector gets "lost" and changes overtime and an error gets returned.
How can one add persistance (like this https://github.com/langchain-ai/langgraph/blob/main/examples/persistence.ipynb) in streamlit?
@nfcampos Great tutorial by the way! Would you know by any chance on how to use persistence with streamlit? Or another approach to keep memory on LangGraph?
Beta Was this translation helpful? Give feedback.
All reactions