Class: OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob
- Defined in:
- lib/openai/models/chat/chat_completion_token_logprob.rb
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.
Instance Method Summary collapse
-
#initialize(token: , bytes: , logprob: , top_logprobs: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see OpenAI::Models::Chat::ChatCompletionTokenLogprob for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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
#initialize(token: , bytes: , logprob: , top_logprobs: ) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Chat::ChatCompletionTokenLogprob for more details.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 51 class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # The token. # # @return [String] required :token, String # @!attribute bytes # 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. # # @return [Array<Integer>, nil] required :bytes, OpenAI::Internal::Type::ArrayOf[Integer], nil?: true # @!attribute logprob # 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. # # @return [Float] required :logprob, Float # @!method initialize(token:, bytes:, logprob:) # Some parameter documentations has been truncated, see # {OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob} for more details. # # @param token [String] The token. # # @param bytes [Array<Integer>, nil] A list of integers representing the UTF-8 bytes representation of the token. Use # # @param logprob [Float] The log probability of this token, if it is within the top 20 most likely tokens end |
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.
65 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 65 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.
73 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 73 required :logprob, Float |
#token ⇒ String
The token.
56 |
# File 'lib/openai/models/chat/chat_completion_token_logprob.rb', line 56 required :token, String |