Class: OpenAI::Models::Beta::BetaResponseCustomToolCallItem

Inherits:
BetaResponseCustomToolCall show all
Defined in:
lib/openai/models/beta/beta_response_custom_tool_call_item.rb,
sig/openai/models/beta/beta_response_custom_tool_call_item.rbs

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Attributes inherited from BetaResponseCustomToolCall

#agent, #async, #call_id, #caller_, #input, #name, #namespace, #type

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:, status:, agent: nil, async: nil, caller_: nil, namespace: nil, created_by: nil, type: :custom_tool_call) ⇒ BetaResponseCustomToolCallItem

Returns a new instance of BetaResponseCustomToolCallItem.

Parameters:

  • call_id —

    An identifier used to map this custom tool call to a tool call output.

  • input —

    The input for the custom tool call generated by the model.

  • name —

    The name of the custom tool being called.

  • id —

    The unique ID of the custom tool call item.

  • status —

    The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

  • agent (defaults to: nil) —

    The agent that produced this item.

  • async (defaults to: nil) —

    Whether the custom tool call runs asynchronously.

  • caller_ (defaults to: nil) —

    The execution context that produced this tool call.

  • namespace (defaults to: nil) —

    The namespace of the custom tool being called.

  • created_by (defaults to: nil) —

    The identifier of the actor that created the item.

  • type (defaults to: :custom_tool_call) —

    The type of the custom tool call. Always custom_tool_call.

  • call_id: (String)
  • input: (String)
  • name: (String)
  • id: (String)
  • status: (OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status)
  • agent: (OpenAI::Beta::BetaResponseCustomToolCall::Agent, nil) (defaults to: nil)
  • async: (Boolean) (defaults to: nil)
  • caller_: (OpenAI::Models::Beta::BetaResponseCustomToolCall::caller_, nil) (defaults to: nil)
  • namespace: (String) (defaults to: nil)
  • created_by: (String) (defaults to: nil)
  • type: (:custom_tool_call) (defaults to: :custom_tool_call)


# File 'lib/openai/models/beta/beta_response_custom_tool_call_item.rb', line 26

Instance Attribute Details

#created_by ⇒ String?

The identifier of the actor that created the item.

Returns:

  • (String, nil)


24
# File 'lib/openai/models/beta/beta_response_custom_tool_call_item.rb', line 24

optional :created_by, String

#id ⇒ String

The unique ID of the custom tool call item.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_custom_tool_call_item.rb', line 11

required :id, String

#status ⇒ OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

Returns:

  • (OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status)


18
# File 'lib/openai/models/beta/beta_response_custom_tool_call_item.rb', line 18

required :status, enum: -> { OpenAI::Beta::BetaResponseCustomToolCallItem::Status }

Instance Method Details

#to_hash ⇒ { call_id: String, input: String, name: String, id: String, status: OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status, ?type: :custom_tool_call, ?agent: OpenAI::Beta::BetaResponseCustomToolCall::Agent?, ?async: bool, ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCall::caller_?, ?namespace: String, ?created_by: String }

Returns:

  • ({ call_id: String, input: String, name: String, id: String, status: OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status, ?type: :custom_tool_call, ?agent: OpenAI::Beta::BetaResponseCustomToolCall::Agent?, ?async: bool, ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCall::caller_?, ?namespace: String, ?created_by: String })


81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'sig/openai/models/beta/beta_response_custom_tool_call_item.rbs', line 81

def to_hash: -> {
  call_id: String,
  input: String,
  name: String,
  id: String,
  status: OpenAI::Models::Beta::BetaResponseCustomToolCallItem::status,
  ?type: :custom_tool_call,
  ?agent: OpenAI::Beta::BetaResponseCustomToolCall::Agent?,
  ?async: bool,
  ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCall::caller_?,
  ?namespace: String,
  ?created_by: String
}