ChatChoice class

Annotations
  • @freezed

Constructors

ChatChoice({required int index, ChatMessage? message, ChatChoiceDelta? delta, String? finishReason, FinishDetails? finishDetails})
const
factory
ChatChoice.fromJson(Map<String, Object?> json)
factory

Properties

copyWith → $ChatChoiceCopyWith<ChatChoice>
no setterinherited
delta ChatChoiceDelta?
no setterinherited
finishDetails FinishDetails?
no setterinherited
finishReason String?
The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool, or function_call (deprecated) if the model called a function.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
index int
The index of the choice in the list of choices.
no setterinherited
message ChatMessage?
A chat completion message generated by the model.
no setterinherited
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>
inherited
toString() String
A string representation of this object.
inherited

Operators

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