ChatCompletionStreamResponseChoice class
A choice the model generated for the input prompt.
- Annotations
-
- @freezed
Constructors
- ChatCompletionStreamResponseChoice({required ChatCompletionStreamResponseDelta delta, @JsonKey.new(includeIfNull: false) ChatCompletionStreamResponseChoiceLogprobs? logprobs, @JsonKey.new(name: 'finish_reason', unknownEnumValue: JsonKey.nullForUndefinedEnumValue) required ChatCompletionFinishReason? finishReason, @JsonKey.new(includeIfNull: false) int? index})
-
Factory constructor for ChatCompletionStreamResponseChoice
constfactory
-
ChatCompletionStreamResponseChoice.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
Properties
-
copyWith
→ $ChatCompletionStreamResponseChoiceCopyWith<
ChatCompletionStreamResponseChoice> -
Create a copy of ChatCompletionStreamResponseChoice
with the given fields replaced by the non-null parameter values.
no setterinherited
- delta → ChatCompletionStreamResponseDelta
-
A chat completion delta generated by streamed model responses.
no setterinherited
- finishReason → ChatCompletionFinishReason?
-
The reason the model stopped generating tokens. This will be
stopif the model hit a natural stop point or a provided stop sequence,lengthif the maximum number of tokens specified in the request was reached,content_filterif content was omitted due to a flag from our content filters,tool_callsif the model called a tool, orfunction_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
- logprobs → ChatCompletionStreamResponseChoiceLogprobs?
-
Log probability information for the choice.
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> -
Serializes this ChatCompletionStreamResponseChoice to a JSON map.
inherited
-
toMap(
) → Map< String, dynamic> - Map representation of object (not serialized)
-
toString(
) → String -
A string representation of this object.
inherited
-
validateSchema(
) → String? - Perform validations on the schema property values
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
propertyNames
→ const List<
String> - List of all property names of schema