CompletionChoice class
A choice in a completion response.
- Annotations
-
- @immutable
Constructors
- CompletionChoice({required int index, required String text, Logprobs? logprobs, FinishReason? finishReason})
-
Creates a CompletionChoice.
const
-
CompletionChoice.fromJson(Map<
String, dynamic> json) -
Creates a CompletionChoice from JSON.
factory
Properties
- finishReason → FinishReason?
-
The reason the model stopped generating.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- index → int
-
The choice index.
final
- logprobs → Logprobs?
-
Log probability information.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
The generated text.
final
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