ChatCompletionChunk class

A single Chat Completion chunk (streaming). Mirrors OpenAI chat.completion.chunk.

Annotations
  • @JsonSerializable.new()

Constructors

ChatCompletionChunk({required String id, required String object, required int created, required String model, required List<ChatCompletionChunkChoice> choices, ChatCompletionUsage? usage})
ChatCompletionChunk.fromJson(Map<String, dynamic> json)
factory

Properties

choices → List<ChatCompletionChunkChoice>
final
created → int
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
model → String
final
object → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
usage → ChatCompletionUsage?
final

Methods

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

Operators

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