Skip to content

AvailableCondition

autogen.agentchat.group.available_condition.AvailableCondition #

Bases: BaseModel

Protocol for determining if a condition is available to be evaluated.

is_available #

is_available(agent, messages)

Determine if the condition should be considered for evaluation.

PARAMETER DESCRIPTION
agent

The agent evaluating the condition

TYPE: ConversableAgent

messages

The conversation history

TYPE: list[dict[str, Any]]

RETURNS DESCRIPTION
bool

True if the condition should be evaluated, False otherwise

Source code in autogen/agentchat/group/available_condition.py
def is_available(self, agent: "ConversableAgent", messages: list[dict[str, Any]]) -> bool:
    """Determine if the condition should be considered for evaluation.

    Args:
        agent: The agent evaluating the condition
        messages: The conversation history

    Returns:
        True if the condition should be evaluated, False otherwise
    """
    raise NotImplementedError("Requires subclasses to implement.")