Find answers from the community

Updated 3 months ago

Extracting chat history from stream_chat

How do I retrieve and save the chat history if I am using streaming chat ??
N
T
9 comments
I read the source code and it’s process in another thread
Is there a way to await it ?
Do you mean long term storage or just session?
For short term you can just use the chat engine which is stateful or for long term memory you can store previous conversations in a vector DB and have contextual memory
Or is that what you mean?
But I want to stream my response
I managed to save my chat history in a db with the normal chat engine
But with the streaming one it only saves the user query and does not await for the streaming to end to save both the user query and AI response
Add a reply
Sign up and join the conversation on Discord