Class: OpenAI::Models::CompletionChoice::Logprobs
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::CompletionChoice::Logprobs
- Defined in:
- lib/openai/models/completion_choice.rb,
sig/openai/models/completion_choice.rbs
Overview
Instance Attribute Summary collapse
- #text_offset ⇒ Array<Integer>?
- #token_logprobs ⇒ Array<Float>?
- #tokens ⇒ Array<String>?
- #top_logprobs ⇒ Array<Hash{Symbol=>Float}>?
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(text_offset: nil, token_logprobs: nil, tokens: nil, top_logprobs: nil) ⇒ Logprobs
constructor
A new instance of Logprobs.
- #to_hash ⇒ { ?text_offset: ::Array[Integer], ?token_logprobs: ::Array[Float], ?tokens: ::Array[String], ?top_logprobs: ::Array[::Hash[Symbol, Float]] }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(text_offset: nil, token_logprobs: nil, tokens: nil, top_logprobs: nil) ⇒ Logprobs
Returns a new instance of Logprobs.
|
|
# File 'lib/openai/models/completion_choice.rb', line 82
|
Instance Attribute Details
#text_offset ⇒ Array<Integer>?
65 |
# File 'lib/openai/models/completion_choice.rb', line 65 optional :text_offset, OpenAI::Internal::Type::ArrayOf[Integer] |
#token_logprobs ⇒ Array<Float>?
70 |
# File 'lib/openai/models/completion_choice.rb', line 70 optional :token_logprobs, OpenAI::Internal::Type::ArrayOf[Float] |
#tokens ⇒ Array<String>?
75 |
# File 'lib/openai/models/completion_choice.rb', line 75 optional :tokens, OpenAI::Internal::Type::ArrayOf[String] |
Instance Method Details
#to_hash ⇒ { ?text_offset: ::Array[Integer], ?token_logprobs: ::Array[Float], ?tokens: ::Array[String], ?top_logprobs: ::Array[::Hash[Symbol, Float]] }
89 90 91 92 93 94 |
# File 'sig/openai/models/completion_choice.rbs', line 89
def to_hash: -> {
?text_offset: ::Array[Integer],
?token_logprobs: ::Array[Float],
?tokens: ::Array[String],
?top_logprobs: ::Array[::Hash[Symbol, Float]]
}
|