Class: OpenAI::Models::CompletionChoice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::CompletionChoice
- Defined in:
- lib/openai/models/completion_choice.rb
Defined Under Namespace
Modules: FinishReason Classes: Logprobs
Instance Attribute Summary collapse
-
#finish_reason ⇒ Symbol, OpenAI::Models::CompletionChoice::FinishReason
The reason the model stopped generating tokens.
- #index ⇒ Integer
- #logprobs ⇒ OpenAI::Models::CompletionChoice::Logprobs?
- #text ⇒ String
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(finish_reason: , index: , logprobs: , text: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see CompletionChoice 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(finish_reason: , index: , logprobs: , text: ) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::CompletionChoice for more details.
|
# File 'lib/openai/models/completion_choice.rb', line 30
|
Instance Attribute Details
#finish_reason ⇒ Symbol, OpenAI::Models::CompletionChoice::FinishReason
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 |
#logprobs ⇒ OpenAI::Models::CompletionChoice::Logprobs?
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 55
|