CompletionLogprobs class

The probabilities on the logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.

Annotations
  • @freezed

Constructors

CompletionLogprobs({@JsonKey(name: 'text_offset', includeIfNull: false) List<int>? textOffset, @JsonKey(name: 'token_logprobs', includeIfNull: false) List<double?>? tokenLogprobs, @JsonKey(includeIfNull: false) List<String>? tokens, @JsonKey(name: 'top_logprobs', includeIfNull: false) List<Map<String, double>?>? topLogprobs})
Factory constructor for CompletionLogprobs
const
factory
CompletionLogprobs.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

copyWith → $CompletionLogprobsCopyWith<CompletionLogprobs>
Create a copy of CompletionLogprobs with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textOffset List<int>?
The offset of the token from the beginning of the prompt.
no setterinherited
tokenLogprobs List<double?>?
The log probabilities of tokens in the completion.
no setterinherited
tokens List<String>?
The tokens generated by the model converted back to text.
no setterinherited
topLogprobs List<Map<String, double>?>?
The log probabilities of the logprobs most likely tokens.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this CompletionLogprobs 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