Class: OpenAI::Models::Chat::ChatCompletionTokenLogprob
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionTokenLogprob
- Defined in:
- lib/openai/models/chat/chat_completion_token_logprob.rb
Defined Under Namespace
Classes: TopLogprob
Instance Attribute Summary collapse
-
#bytes ⇒ Array<Integer>?
A list of integers representing the UTF-8 bytes representation of the token.
-
#logprob ⇒ Float
The log probability of this token, if it is within the top 20 most likely tokens.
-
#token ⇒ String
The token.
-
#top_logprobs ⇒ Array<OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob>
List of the most likely tokens and their log probability, at this token position.
Method Summary
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
This class inherits a constructor from OpenAI::Internal::Type::BaseModel
Instance Attribute Details
#bytes ⇒ Array<Integer>?
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be ‘null` if there is no bytes representation for the token.
20 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 20 required :bytes, OpenAI::Internal::Type::ArrayOf[Integer], nil?: true |
#logprob ⇒ Float
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value ‘-9999.0` is used to signify that the token is very unlikely.
28 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 28 required :logprob, Float |
#token ⇒ String
The token.
11 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 11 required :token, String |
#top_logprobs ⇒ Array<OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob>
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested ‘top_logprobs` returned.
36 37 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 36 required :top_logprobs, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionTokenLogprob::TopLogprob] } |