You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Hi @hardchor, would you be able to provide some code that shows the resume failing?
As a note, the use of the user roles on the internal messages may not reflect a human input, I believe they are more aligned with the alternating interaction between agents.
Describe the bug
When running a group chat and retrieving the
chat_result
, all user messages are flagged asrole="assistant"
.This causes an issue, e.g. when using the
chat_result
to later on resume the conversation (or when relying on therole
value to display whether a message came from the user in a UI).Steps to reproduce
Model Used
gpt-4o
Expected Behavior
Messages coming from users (i.e. via
UserProxyAgent
) should be marked asrole="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
. SinceGroupChatManager
doesn't override thesend
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.
The text was updated successfully, but these errors were encountered: