Class: OpenAI::Models::DecisionInputJSON

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

Defined Under Namespace

Modules: Data

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(data:, type: :input_json) ⇒ DecisionInputJSON

A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

Parameters:

  • data (Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>)
  • type (Symbol, :input_json) (defaults to: :input_json)
  • data: (OpenAI::Models::DecisionInputJSON::data)
  • type: (:input_json) (defaults to: :input_json)


# File 'lib/openai/models/decision_input_json.rb', line 16

Instance Attribute Details

#data ⇒ Hash{Symbol=>Object}+

Parameters:

  • value (OpenAI::Models::DecisionInputJSON::data)

Returns:

  • (Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>)


9
# File 'lib/openai/models/decision_input_json.rb', line 9

required :data, union: -> { OpenAI::DecisionInputJSON::Data }

#type ⇒ Symbol, :input_json

Parameters:

  • value (:input_json)

Returns:

  • (Symbol, :input_json)


14
# File 'lib/openai/models/decision_input_json.rb', line 14

required :type, const: :input_json

Instance Method Details

#to_hash ⇒ { data: OpenAI::Models::DecisionInputJSON::data, ?type: :input_json }

Returns:

  • ({ data: OpenAI::Models::DecisionInputJSON::data, ?type: :input_json })


16
17
18
19
# File 'sig/openai/models/decision_input_json.rbs', line 16

def to_hash: -> {
  data: OpenAI::Models::DecisionInputJSON::data,
  ?type: :input_json
}