Class: OpenAI::Models::Responses::ResponseCustomToolCall

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

Direct Known Subclasses

ResponseCustomToolCallItem

Defined Under Namespace

Modules: Caller

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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, async: nil, caller_: nil, namespace: nil, type: :custom_tool_call) ⇒ Object

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 (defaults to: nil)

    The unique ID of the custom tool call in the OpenAI platform.

  • 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.

  • type (defaults to: :custom_tool_call)

    The type of the custom tool call. Always custom_tool_call.



# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 60


Instance Attribute Details

#asyncBoolean?

Whether the custom tool call runs asynchronously.

Returns:



41
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 41

optional :async, OpenAI::Internal::Type::Boolean

#call_idString

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

Returns:

  • (String)


11
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 11

required :call_id, String

#caller_OpenAI::Models::Responses::ResponseCustomToolCall::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Responses::ResponseCustomToolCall::caller_, nil)


47
48
49
50
51
52
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 47

optional(
  :caller_,
  union: -> { OpenAI::Responses::ResponseCustomToolCall::Caller },
  api_name: :caller,
  nil?: true
)

#idString?

The unique ID of the custom tool call in the OpenAI platform.

Returns:

  • (String, nil)


35
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 35

optional :id, String

#inputString

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

Returns:

  • (String)


17
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 17

required :input, String

#nameString

The name of the custom tool being called.

Returns:

  • (String)


23
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 23

required :name, String

#namespaceString?

The namespace of the custom tool being called.

Returns:

  • (String, nil)


58
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 58

optional :namespace, String

#type:custom_tool_call

The type of the custom tool call. Always custom_tool_call.

Returns:

  • (:custom_tool_call)


29
# File 'lib/openai/models/responses/response_custom_tool_call.rb', line 29

required :type, const: :custom_tool_call

Instance Method Details

#to_hash{

Returns:

  • ({)


77
# File 'sig/openai/models/responses/response_custom_tool_call.rbs', line 77

def to_hash: -> {