ChatStreamChoice class

A single choice in a streaming response.

Annotations
  • @immutable

Constructors

ChatStreamChoice({int? index, required ChatDelta delta, FinishReason? finishReason, Logprobs? logprobs})
Creates a ChatStreamChoice.
const
ChatStreamChoice.fromJson(Map<String, dynamic> json)
Creates a ChatStreamChoice from JSON.
factory

Properties

delta ChatDelta
The delta content for this chunk.
final
finishReason FinishReason?
The reason the model stopped generating (in the final chunk).
final
hashCode int
The hash code for this object.
no setteroverride
index int?
The index of this choice in the list.
final
isFinal bool
Whether this is the final chunk (has a finish reason).
no setter
logprobs Logprobs?
Log probability information.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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