evaluate • AI Agent SDK

evaluate: Evaluate the condition against the given context.

evaluate

Method

</div>

This is a method of the ExpressionCondition class in the evaluator module.

Evaluate the condition against the given context.

Signature

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

Parameters

ParamField Dict[str, Any]

Dictionary containing variables for evaluation. Special key ‘previous_output’ is also substituted.

Returns

ResponseField bool

Boolean result of condition evaluation. Returns False on evaluation errors (fail-safe).

Uses

  • evaluate_condition

Source

View on GitHub

praisonaiagents/conditions/evaluator.py at line 43


Related Documentation