Find answers from the community

Updated 5 months ago

Hey! Im having issues with chat history

At a glance

The community member is having issues with the chat history of their agent. They have deleted the messages from the database and reset the chat history by sending an empty array, but the agent is still referencing old prompts and responses. The comments suggest that if the chat history is managed outside of the agent, the community member can pass the chat history on every .chat() call, where the chat history is a list of ChatMessage objects. The comments also mention that the community member is using a query engine and asks if they should change to using .chat() instead.

Hey! Im having issues with chat history of my agent, i delete the messages from the database of the conversation and i also reset the chat history of the agent sending him an empty array. But it is still having old responses with old prompts, referencing to old messages, etc. Any recommendations on how to restart from scratch an agent?
L
C
5 comments
If you are managing the chat history outside of the agent, you can pass in the chat history on every .chat() call
.chat("Hello!", chat_history=chat_history)
Where chat history is a list of ChatMessage objects
im using query engine, should i change to chat?
Sorry, I guess I'm confused on your setup. You mentioned you had an agent right? The above would work for that as well
Add a reply
Sign up and join the conversation on Discord