ChatResult<T extends Object> class

Result returned by the Chat Model.

Inheritance

Constructors

ChatResult({required T output, FinishReason finishReason = FinishReason.unspecified, Map<String, dynamic> metadata = const {}, LanguageModelUsage? usage, List<ChatMessage> messages = const [], String? thinking, String? id})
Creates a new chat result instance.

Properties

finishReason FinishReason
The reason the model stopped generating tokens.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Result id.
finalinherited
messages List<ChatMessage>
The new messages generated during this chat interaction.
final
metadata Map<String, dynamic>
Other metadata about the generation.
finalinherited
output → T
Generated output.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thinking String?
Thinking content for real-time streaming display (for reasoning models).
final
usage LanguageModelUsage?
Usage stats for the generation.
finalinherited

Methods

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

Operators

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