Class: OpenAI::Models::DecisionCreateParams::Question::Choice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::DecisionCreateParams::Question::Choice
- Defined in:
- lib/openai/models/decision_create_params.rb,
sig/openai/models/decision_create_params.rbs
Defined Under Namespace
Modules: Instructions Classes: Choice
Instance Attribute Summary collapse
-
#choices ⇒ ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice]
Provide between 2 and 255 choices.
- #instructions ⇒ String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>
- #name ⇒ String?
-
#type ⇒ :choice
The type of the object.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Choice
constructor
A new instance of Choice.
- #to_hash ⇒ { choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice], instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions, ?type: :choice, ?name: String }
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 ⇒ Choice
Returns a new instance of Choice.
800 801 802 803 804 805 |
# File 'sig/openai/models/decision_create_params.rbs', line 800
def initialize: (
choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions,
?name: String,
?type: :choice
) -> void
|
Instance Attribute Details
#choices ⇒ ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice]
Provide between 2 and 255 choices. Each choice must be unique.
890 891 892 893 |
# File 'lib/openai/models/decision_create_params.rb', line 890 required( :choices, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::DecisionCreateParams::Question::Choice::Choice] } ) |
#instructions ⇒ String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>
898 |
# File 'lib/openai/models/decision_create_params.rb', line 898 required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Choice::Instructions } |
#name ⇒ String?
909 |
# File 'lib/openai/models/decision_create_params.rb', line 909 optional :name, String |
#type ⇒ :choice
The type of the object. Always choice.
904 |
# File 'lib/openai/models/decision_create_params.rb', line 904 required :type, const: :choice |
Class Method Details
Instance Method Details
#to_hash ⇒ { choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice], instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions, ?type: :choice, ?name: String }
807 808 809 810 811 812 |
# File 'sig/openai/models/decision_create_params.rbs', line 807
def to_hash: -> {
choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions,
?type: :choice,
?name: String
}
|