Class: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCallOutput

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/decision_item_create_event.rb,
sig/openai/models/live/decision_item_create_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(call_id:, output:, id: nil, 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.

  • id (defaults to: nil) —

    The local Decision item ID.

  • type (defaults to: :function_call_output) —

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

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


# File 'lib/openai/models/live/decision_item_create_event.rb', line 184

Instance Attribute Details

#call_id ⇒ String

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

Returns:

  • (String)


152
# File 'lib/openai/models/live/decision_item_create_event.rb', line 152

required :call_id, String

#id ⇒ String?

The local Decision item ID.

Returns:

  • (String, nil)


173
# File 'lib/openai/models/live/decision_item_create_event.rb', line 173

optional :id, String, nil?: true

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

The text input to the model.

Returns:

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


158
159
160
161
# File 'lib/openai/models/live/decision_item_create_event.rb', line 158

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

#status ⇒ Symbol, ...

Parameters:

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

Returns:



178
179
180
181
182
# File 'lib/openai/models/live/decision_item_create_event.rb', line 178

optional(
  :status,
  enum: -> { OpenAI::Live::DecisionItemCreateEvent::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)


167
# File 'lib/openai/models/live/decision_item_create_event.rb', line 167

required :type, const: :function_call_output

Instance Method Details

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

Returns:

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


162
163
164
165
166
167
168
# File 'sig/openai/models/live/decision_item_create_event.rbs', line 162

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