Class: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput

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

Defined Under Namespace

Modules: Output, Status

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(id:, call_id:, output:, status: nil, type: :function_call_output) ⇒ FunctionCallOutput

Returns a new instance of FunctionCallOutput.

Parameters:

  • call_id —

    The unique ID of the function tool call generated by the model.

  • output —

    The text input to the model.

  • type (defaults to: :function_call_output) —

    The type of the function tool call output. Always function_call_output.

  • id: (String)
  • call_id: (String)
  • output: (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output)
  • status: (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::status, nil) (defaults to: nil)
  • type: (:function_call_output) (defaults to: :function_call_output)


# File 'lib/openai/models/live/decision_item_created_event.rb', line 189

Instance Attribute Details

#call_id ⇒ String

The unique ID of the function tool call generated by the model.

Returns:

  • (String)


163
# File 'lib/openai/models/live/decision_item_created_event.rb', line 163

required :call_id, String

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


157
# File 'lib/openai/models/live/decision_item_created_event.rb', line 157

required :id, String

#output ⇒ OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output

The text input to the model.

Returns:

  • (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output)


169
170
171
172
# File 'lib/openai/models/live/decision_item_created_event.rb', line 169

required(
  :output,
  union: -> { OpenAI::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::Output }
)

#status ⇒ Symbol, ...

Parameters:

  • value (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::status, nil)

Returns:



183
184
185
186
187
# File 'lib/openai/models/live/decision_item_created_event.rb', line 183

optional(
  :status,
  enum: -> { OpenAI::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::Status },
  nil?: true
)

#type ⇒ :function_call_output

The type of the function tool call output. Always function_call_output.

Returns:

  • (:function_call_output)


178
# File 'lib/openai/models/live/decision_item_created_event.rb', line 178

required :type, const: :function_call_output

Instance Method Details

#to_hash ⇒ { id: String, call_id: String, output: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output, ?type: :function_call_output, ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::status? }

Returns:

  • ({ id: String, call_id: String, output: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output, ?type: :function_call_output, ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::status? })


168
169
170
171
172
173
174
# File 'sig/openai/models/live/decision_item_created_event.rbs', line 168

def to_hash: -> {
  id: String,
  call_id: String,
  output: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::output,
  ?type: :function_call_output,
  ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCallOutput::status?
}