ServerToolsStopCondition class

A condition that stops an agent loop when it is met.

Constructors

ServerToolsStopCondition.finishReason(String value)
Stop when the upstream model emits this finish reason (e.g. length).
const
ServerToolsStopCondition.hasToolCall(String value)
Stop after a tool with this name has been called.
const
ServerToolsStopCondition.maxCost(double value)
Stop once cumulative cost across the loop exceeds this dollar threshold.
const
ServerToolsStopCondition.maxTokensUsed(int value)
Stop once cumulative token usage across the loop exceeds this threshold.
const
ServerToolsStopCondition.stepCount(int value)
Stop after the agent loop has executed this many steps.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type of stop condition (e.g. 'step_count_is', 'has_tool_call').
final
value → dynamic
The condition's threshold or target value.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this stop condition to its JSON representation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited