Class: OpenAI::Models::CompletionChoice
Defined Under Namespace
Modules: FinishReason
Classes: Logprobs
Instance Attribute Summary collapse
#last_response
Class Method Summary
collapse
Instance Method Summary
collapse
==, #==, #[], #_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
#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(finish_reason:, index:, logprobs:, text:) ⇒ Object
|
# File 'lib/openai/models/completion_choice.rb', line 30
|
Instance Attribute Details
#finish_reason ⇒ OpenAI::Models::CompletionChoice::finish_reason
The reason the model stopped generating tokens. This will be stop if the model
hit a natural stop point or a provided stop sequence, length if the maximum
number of tokens specified in the request was reached, or content_filter if
content was omitted due to a flag from our content filters.
13
|
# File 'lib/openai/models/completion_choice.rb', line 13
required :finish_reason, enum: -> { OpenAI::CompletionChoice::FinishReason }
|
#index ⇒ Integer
18
|
# File 'lib/openai/models/completion_choice.rb', line 18
required :index, Integer
|
23
|
# File 'lib/openai/models/completion_choice.rb', line 23
required :logprobs, -> { OpenAI::CompletionChoice::Logprobs }, nil?: true
|
#text ⇒ String
28
|
# File 'lib/openai/models/completion_choice.rb', line 28
required :text, String
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/openai/models/completion_choice.rb', line 56
|
Instance Method Details
#to_hash ⇒ {
36
|
# File 'sig/openai/models/completion_choice.rbs', line 36
def to_hash: -> {
|