SpeakerSelectionResult

SpeakerSelectionResult(**data: Any)

Represents a speaker selection result that will be returned to GroupChat._prepare_and_select_agents to determine the next speaker.
This class can return an Agent, a None to end the conversation, or a string for a speaker selection method.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.

Parameters:
NameDescription
**dataType: Any

Class Attributes

agent_name



model_config



speaker_selection_method



terminate



Instance Methods

get_speaker_selection_result

get_speaker_selection_result(self, groupchat: GroupChat) -> Agent | str | None

Get the speaker selection result. If None, the conversation will end.

Parameters:
NameDescription
groupchatType: GroupChat