StringAvailableCondition
autogen.agentchat.group.available_condition.StringAvailableCondition #
Bases: AvailableCondition
String-based available condition.
This condition checks if a named context variable exists and is truthy.
Initialize with a context variable name as a positional parameter.
PARAMETER | DESCRIPTION |
---|---|
context_variable | The name of the context variable to check TYPE: |
data | Additional data for the parent class TYPE: |
Source code in autogen/agentchat/group/available_condition.py
is_available #
Check if the named context variable is truthy.
PARAMETER | DESCRIPTION |
---|---|
agent | The agent with context variables TYPE: |
messages | The conversation history (not used) |
RETURNS | DESCRIPTION |
---|---|
bool | True if the variable exists and is truthy, False otherwise |