Log in
Log into community
Find answers from the community
Most posts
Powered by
Hall
Home
Members
Sourav-TE
S
Sourav-TE
Offline
, last seen 6 months ago
Joined September 25, 2024
Contributions
Comments
Replies
S
Sourav-TE
9 months ago
·
**TypeError: Object of type
TypeError
: Object of type AgentChatResponse is not JSON serializable
Getting this error while using chat_history for agent chat in Llama Index. Need a quick resolution. Any help on this? You can get the code below-
'''chat_history.append(ChatMessage(role= MessageRole.USER, content=user_message))
response = agent.chat(message=user_message, chat_history= chat_history)
chat_history.append(ChatMessage(role= MessageRole.ASSISTANT, content=response))'''
It is working fine for the 1st time query and giving the error from 2nd one.
Any quick fix?
1 comment
L