Skip to content

the roles in chat_history seem confused? #1839

Discussion options

You must be logged in to vote

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.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@huangch
Comment options

@nileshtrivedi
Comment options

@ekzhu
Comment options

@nileshtrivedi
Comment options

@ekzhu
Comment options

Answer selected by huangch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants