AiResult class

One assistant turn returned by a provider.

Constructors

AiResult({String? text, List<AiToolCall> toolCalls = const [], AiStopReason stopReason = AiStopReason.endTurn, AiUsage? usage})
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
stopReason → AiStopReason
Why the turn ended.
final
text → String?
Assistant prose for this turn, if any.
final
toolCalls → List<AiToolCall>
Tool calls the model wants executed before continuing.
final
usage → AiUsage?
Token usage and latency for this turn, or null if the provider did not report any (the agent then omits it from the run's stats line).
final
wantsTools → bool
Whether the model requested at least one tool call.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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