Class: OpenAI::Models::Live::DecisionChoiceOption

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/decision_choice_option.rb,
sig/openai/models/live/decision_choice_option.rbs

Defined Under Namespace

Modules: Value

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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(value:, description: nil) ⇒ DecisionChoiceOption

Returns a new instance of DecisionChoiceOption.

Parameters:

  • value (String, Boolean)
  • description (String) (defaults to: nil)
  • value: (OpenAI::Models::Live::DecisionChoiceOption::value)
  • description: (String) (defaults to: nil)


# File 'lib/openai/models/live/decision_choice_option.rb', line 17

Instance Attribute Details

#description ⇒ String?

Parameters:

  • (String)

Returns:

  • (String, nil)


15
# File 'lib/openai/models/live/decision_choice_option.rb', line 15

optional :description, String

#value ⇒ String, Boolean

Parameters:

  • value (OpenAI::Models::Live::DecisionChoiceOption::value)

Returns:



10
# File 'lib/openai/models/live/decision_choice_option.rb', line 10

required :value, union: -> { OpenAI::Live::DecisionChoiceOption::Value }

Instance Method Details

#to_hash ⇒ { value: OpenAI::Models::Live::DecisionChoiceOption::value, ?description: String }

Returns:

  • ({ value: OpenAI::Models::Live::DecisionChoiceOption::value, ?description: String })


22
23
24
25
# File 'sig/openai/models/live/decision_choice_option.rbs', line 22

def to_hash: -> {
  value: OpenAI::Models::Live::DecisionChoiceOption::value,
  ?description: String
}