Skip to content

SelectSpeakerMessage

autogen.messages.agent_messages.SelectSpeakerMessage #

SelectSpeakerMessage(*, uuid=None, agents=None)

Bases: BaseMessage

Source code in autogen/messages/agent_messages.py
def __init__(self, *, uuid: Optional[UUID] = None, agents: Optional[list["Agent"]] = None):
    agent_names = [agent.name for agent in agents] if agents else None
    super().__init__(uuid=uuid, agent_names=agent_names)

uuid instance-attribute #

uuid

agent_names class-attribute instance-attribute #

agent_names = None

print #

print(f=None)
Source code in autogen/messages/agent_messages.py
def print(self, f: Optional[Callable[..., Any]] = None) -> None:
    f = f or print

    f("Please select the next speaker from the following list:")
    agent_names = self.agent_names or []
    for i, agent_name in enumerate(agent_names):
        f(f"{i + 1}: {agent_name}")