autogen.agentchat.group.targets.transition_target.TransitionTarget
TransitionTarget
Base class for all transition targets across OnCondition, OnContextCondition, and after work.
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.
Name | Description |
---|---|
**data | Type: Any |
Class Attributes
model_config
Instance Methods
can_resolve_for_speaker_selection
Check if the target can resolve to an option for speaker selection (Agent, ‘None’ to end, Str for speaker selection method). In the case of a nested chat, this will return False as it should be encapsulated in an agent.
create_wrapper_agent
Create a wrapper agent for the target if needed.
Parameters:Name | Description |
---|---|
parent_agent | Type: ConversableAgent |
index | Type: int |
display_name
Get the display name for the target.
needs_agent_wrapper
Check if the target needs to be wrapped in an agent.
normalized_name
Get a normalized name for the target that has no spaces, used for function calling
resolve
Resolve to a speaker selection result (Agent, None for termination, or str for speaker selection method).
Parameters:Name | Description |
---|---|
groupchat | Type: GroupChat |
current_agent | Type: ConversableAgent |
user_agent | Type: ForwardRef(‘ConversableAgent’) | None |