stepCountIs
Stop the tool loop after a number of steps.
The stop condition you will use most. Caps how many times the loop may call the model, which bounds both cost and the chance of an agent spinning.
stopWhen: [stepCountIs(5)]Signature
func stepCountIs(
_ count: Int
) -> StopConditionDefined in Sources/AI/Core/StepControl.swift.
Parameters
| Parameter | Type | Default |
|---|---|---|
_ | Int | required |
Returns
A StopCondition.