Skip to content

StopCondition

Namespace: Vercel.AI

public abstract class StopCondition

Stops the tool loop. The default for generateText is IsStepCount(int) of 1.

Inheritance: object

View source

public abstract bool ShouldStop(IReadOnlyList<StepResult> steps)

Returns true when the loop should stop after <code class=“paramref”>steps</code>.

Parameters

Name Type Description
steps IReadOnlyList<StepResult>

Returns: bool

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product