Class: OpenAI::Models::Responses::ResponseFunctionToolCall

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

Direct Known Subclasses

ResponseFunctionToolCallItem

Defined Under Namespace

Modules: Caller, Status

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(caller_id:, type: :program) ⇒ Object

Parameters:

  • arguments —

    A JSON string of the arguments to pass to the function.

  • call_id —

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

  • name —

    The name of the function to run.

  • id —

    The unique ID of the function tool call.

  • async —

    Whether the function tool call runs asynchronously.

  • caller_ —

    The execution context that produced this tool call.

  • namespace —

    The namespace of the function to run.

  • status —

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

  • type (defaults to: :program) —

    The type of the function tool call. Always function_call.



# File 'lib/openai/models/responses/response_function_tool_call.rb', line 75

Instance Attribute Details

#arguments ⇒ String

A JSON string of the arguments to pass to the function.

Returns:

  • (String)


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

required :arguments, String

#async ⇒ Boolean?

Whether the function tool call runs asynchronously.

Returns:



49
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 49

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

#call_id ⇒ String

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

Returns:

  • (String)


25
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 25

required :call_id, String

#caller_ ⇒ OpenAI::Models::Responses::ResponseFunctionToolCall::caller_?

The execution context that produced this tool call.

Returns:

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


55
56
57
58
59
60
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 55

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

#id ⇒ String?

The unique ID of the function tool call.

Returns:

  • (String, nil)


43
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 43

optional :id, String

#name ⇒ String

The name of the function to run.

Returns:

  • (String)


31
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 31

required :name, String

#namespace ⇒ String?

The namespace of the function to run.

Returns:

  • (String, nil)


66
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 66

optional :namespace, String

#status ⇒ OpenAI::Models::Responses::ResponseFunctionToolCall::status?

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

Returns:

  • (OpenAI::Models::Responses::ResponseFunctionToolCall::status, nil)


73
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 73

optional :status, enum: -> { OpenAI::Responses::ResponseFunctionToolCall::Status }

#type ⇒ :function_call

The type of the function tool call. Always function_call.

Returns:

  • (:function_call)


37
# File 'lib/openai/models/responses/response_function_tool_call.rb', line 37

required :type, const: :function_call

Class Method Details

.variants ⇒ Array(OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Program)



# File 'lib/openai/models/responses/response_function_tool_call.rb', line 149

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


92
# File 'sig/openai/models/responses/response_function_tool_call.rbs', line 92

def to_hash: -> {