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?