Langchain - Memory

Hi all,

If you are looking into implementing the langchain memory to mimic a chatbot in streamlit using openAI API, here is the code snippet that might help you.

you need to put st.cache_resource and put all the functions in a function call.


To anyone in the same boat, the decorator below also works:


1 Like