Chat message history in a group chat | used function calling #3155
Replies: 1 comment
-
Hi, can you please review issue #3408 and PR addressing it #3412 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have set up a multi-agent conversation in a group chat with function calling. However, I've encountered an issue while isolating the history of the complete chat. I could not receive the complete history of the conversation.
It's providing the some part of the history.
The tool call part and the agents roles are working fine. But only issue with getting history of the whole chat.
I' m using the below code:
groupchat = autogen.GroupChat(agents=[user_proxy, agent_A, agent_B], messages=[], max_round=10)
manager = autogen.GroupChatManager(groupchat=groupchat,
llm_config=llm_config,
is_termination_msg=lambda x: "TERMINATE" in x.get("content", "")
)
result=user_proxy.initiate_chat(
manager,
message=""" #my user query"""
)
print("here is the chat history.........",result.chat_history)
I want the complete chat history to prepare for resume chat.
Could anyone advise if there's a way to capture complete chat history?
instead of using chat_history, i used the manager.groupchat.messages
message_json = manager.messages_from_string(manager.groupchat.messages)
the above line of code is throwing the error:
Error code: 400 - {'error': {'message': "Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'.
Beta Was this translation helpful? Give feedback.
All reactions