hasToolCall
Stop once a named tool has been called.
Ends the loop as soon as the model calls the tool you name. The usual pattern
is a terminal tool such as submit_answer or finish, which turns "the model
decided it is done" into a stop condition.
stopWhen: [hasToolCall("submit_answer")]Signature
func hasToolCall(
_ toolNames: String...
) -> StopConditionDefined in Sources/AI/Core/StepControl.swift.
Parameters
| Parameter | Type | Default |
|---|---|---|
_ | String... | required |
Returns
A StopCondition.