Class: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::CustomToolCall

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: 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:, input:, name:, id: nil, namespace: nil, status: nil, type: :custom_tool_call) ⇒ CustomToolCall

Returns a new instance of CustomToolCall.

Parameters:

  • call_id —

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

  • input —

    The input to the custom tool call.

  • name —

    The name of the custom tool to call.

  • id (defaults to: nil) —

    The local Decision item ID.

  • namespace (defaults to: nil) —

    The namespace of the function to call.

  • type (defaults to: :custom_tool_call) —

    The item type. Always custom_tool_call.

  • call_id: (String)
  • input: (String)
  • name: (String)
  • id: (String, nil) (defaults to: nil)
  • namespace: (String, nil) (defaults to: nil)
  • status: (OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::CustomToolCall::status, nil) (defaults to: nil)
  • type: (:custom_tool_call) (defaults to: :custom_tool_call)


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

Instance Attribute Details

#call_id ⇒ String

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

Returns:

  • (String)


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

required :call_id, String

#id ⇒ String?

The local Decision item ID.

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#input ⇒ String

The input to the custom tool call.

Returns:

  • (String)


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

required :input, String

#name ⇒ String

The name of the custom tool to call.

Returns:

  • (String)


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

required :name, String

#namespace ⇒ String?

The namespace of the function to call.

Returns:

  • (String, nil)


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

optional :namespace, String, nil?: true

#status ⇒ Symbol, ...

Parameters:

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

Returns:



344
345
346
347
348
# File 'lib/openai/models/live/decision_item_create_event.rb', line 344

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

#type ⇒ :custom_tool_call

The item type. Always custom_tool_call.

Returns:

  • (:custom_tool_call)


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

required :type, const: :custom_tool_call

Instance Method Details

#to_hash ⇒ { call_id: String, input: String, name: String, ?type: :custom_tool_call, ?id: String?, ?namespace: String?, ?status: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::CustomToolCall::status? }

Returns:

  • ({ call_id: String, input: String, name: String, ?type: :custom_tool_call, ?id: String?, ?namespace: String?, ?status: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::CustomToolCall::status? })


307
308
309
310
311
312
313
314
315
# File 'sig/openai/models/live/decision_item_create_event.rbs', line 307

def to_hash: -> {
  call_id: String,
  input: String,
  name: String,
  ?type: :custom_tool_call,
  ?id: String?,
  ?namespace: String?,
  ?status: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::CustomToolCall::status?
}