OpenAICompletionModelChoice class final

This class is used to represent a choice generated by a completion request.

Annotations
  • @immutable

Constructors

OpenAICompletionModelChoice({required String text, required int index, required int? logprobs, required String? finishReason})
This class is used to represent a choice generated by a completion request.
const
OpenAICompletionModelChoice.fromMap(Map<String, dynamic> json)
This class is used to represent a choice generated by a completion request. This method is used to convert a Map<String, dynamic> object to a OpenAICompletionModelChoice object.
factory

Properties

finishReason String?
The reason the completion finished.
final
hashCode int
The hash code for this object.
no setteroverride
index int
The index of the choice.
final
logprobs int?
The log probabilities of the tokens in the completion.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The text generated by the completion.
final

Methods

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

Operators

operator ==(covariant OpenAICompletionModelChoice other) bool
The equality operator.
override