Skip to main content

evaluate_when

Method
This is a method of the Task class in the task module.
Evaluate the ‘when’ condition against the given context. Uses the shared evaluate_condition function from the conditions module for DRY compliance with AgentFlow condition evaluation.

Signature

def evaluate_when(context: Dict[str, Any]) -> bool

Parameters

context
Dict
required
Dictionary containing variables for evaluation. May include workflow variables, previous outputs, etc.

Returns

Returns
bool
True if condition is met or no condition is set. False if condition is not met.

Uses

  • evaluate_condition

Source

View on GitHub

praisonaiagents/task/task.py at line 817