I have a mongoDB that stores user chat history using their session ID.
I need to pass this history to ConversationRetrievalChain, using the ConversationBufferMemory.
How can I transform/ insert the history into a new ConversationBufferMemory?
I have a mongoDB that stores user chat history using their session ID.
I need to pass this history to ConversationRetrievalChain, using the ConversationBufferMemory.
How can I transform/ insert the history into a new ConversationBufferMemory?
2
Answers
What you can do is to
MessagesPlaceholder
inPromptTemplate
memory
from your MongoDBmemory
The reference doc > https://python.langchain.com/docs/expression_language/cookbook/memory
I am experiencing the same issue. Although I successfully retrieve the chat history from MongoDB for the specific session ID, it is not being utilized in the chain.