GenerationToken class final

Deprecated v3 shape: one decoded token tagged with kind instead of a dedicated event per stream.

llm/vlm generateStream no longer emit this — they emit GenerationTextDelta (kind == TokenKind.text) or GenerationReasoningDelta (kind == TokenKind.thought) — but the type remains for source compatibility.

Inheritance
Annotations
  • @Deprecated('Use GenerationTextDelta for answer text or GenerationReasoningDelta ' 'for thoughts')

Constructors

GenerationToken(String text, {TokenKind kind = TokenKind.text, String requestId = ''})
Carry a token and its semantic category.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
kind TokenKind
Whether this is answer text or a thought.
final
requestId String
Correlation id for the generation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Token text.
final

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