OnContextCondition
autogen.agentchat.group.on_context_condition.OnContextCondition #
Bases: BaseModel
Defines a condition for transitioning to another agent or nested chats using context variables and the ContextExpression class.
This is for context variable-based condition evaluation (does not use the agent's LLM).
These are evaluated before the OnCondition and after work conditions.
PARAMETER | DESCRIPTION |
---|---|
target | The transition (essentially an agent) to hand off to. TYPE: |
condition | The context variable based condition for transitioning to the target agent. TYPE: |
available | Optional condition to determine if this OnCondition is included for the LLM to evaluate based on context variables using classes like StringAvailableCondition and ContextExpressionAvailableCondition. TYPE: |
has_target_type #
Check if the target type matches the specified type.
PARAMETER | DESCRIPTION |
---|---|
target_type | The target type to check against. Should be a subclass of TransitionTarget. TYPE: |
RETURNS | DESCRIPTION |
---|---|
bool | True if the target type matches, False otherwise TYPE: |