Replies: 1 comment 1 reply
-
This is a common source of confusion. When two agents are conversing, each maintains its own copy of the message history, and their roles are reversed in those two copies. The reason for this is because openai defined a fixed set of message roles like user and assistant, and autogen follows those roles in its message lists. In a group chat it may be that none of the agents represent the user, and yet every message list sent to the LLM must be annotated with user and assistant roles. The simple rule to remember is that every agent carries the assistant role in its own copy of the message list. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When i invoke a conversation
user_proxy.initiate_chat(assistant, message=question)
where
user_proxy
is an instance ofUserProxyAgent
and
assistant
is an instance ofAssistantAgent
the very first message in the
chat_history
, which is seen asuser_proxy (to assistant):
is the message that theuser_proxy
sends toassistant
. I was expecting it would be labeled as auser
message but it is tagged as{role: assistant }
. DoesUserProxyAgent
not represent the user ? hence the very first message should be tagged as 'user`. I am confused.Beta Was this translation helpful? Give feedback.
All reactions