Description
Describe the bug
When running a group chat and retrieving the chat_result
, all user messages are flagged as role="assistant"
.
This causes an issue, e.g. when using the chat_result
to later on resume the conversation (or when relying on the role
value to display whether a message came from the user in a UI).
Steps to reproduce
- Initiate a group chat
chat_result = user_proxy.initiate_chat(group_chat_manager, message="Hello world!")
- Send a few messages, exit & inspect the chat results
Model Used
gpt-4o
Expected Behavior
Messages coming from users (i.e. via UserProxyAgent
) should be marked as role="user"
Screenshots and logs
No response
Additional Information
I noticed that https://github.com/microsoft/autogen/blob/main/autogen/agentchat/conversable_agent.py#L653 hardcodes "assistent", which is the value that ends up in self._oai_messages
. Since GroupChatManager
doesn't override the send
function, I believe (!) this might be the culprit.
P.S.: I noticed https://github.com/microsoft/autogen/blob/main/autogen/agentchat/conversable_agent.py#L774 hardcoding "user" on the receiver side, which might cause a similar issue.