Choice class

A choice in the completion prompt.

Annotations
  • @JsonSerializable.new(includeIfNull: true)

Constructors

Choice(String text, int index, String finishReason, {Logprobs? logprobs})
Choice.fromJson(Map<String, dynamic> json)
factory

Properties

finishReason → String
The reason why the text stops, e.g. "length".
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
The index of the choice in the list.
final
logprobs → Logprobs?
The logprobs object with further information about the probabilities of tokens. Only available if the parameter "log_probs" is given in the call.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
The completion text generated by GPT-3.
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