API Reference
any
function any(...conditions): StopCondition;Defined in: stop/conditions.ts:69
Combine conditions: stop if ANY of them say so.
Parameters
| Parameter | Type | Description |
|---|---|---|
...conditions | StopCondition[] | The conditions to OR together. |
Returns
A StopCondition that fires when at least one input fires.
Remarks
Conditions are evaluated in order and short-circuits on the first true.
An empty list never stops.
Example
const stop = any(maxSteps(10), whenToolCalled("submit_answer"));