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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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:

  • caller_id (String)

    The call ID of the program item that produced this tool call.

  • type (Symbol, :program) (defaults to: :program)


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

Instance Attribute Details

#argumentsString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :arguments, String

#call_idString

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

Parameters:

  • value (String)

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::Direct, ...

The execution context that produced this tool call.

Parameters:

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

Returns:



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

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

#idString?

The unique ID of the function tool call.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :id, String

#nameString

The name of the function to run.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#namespaceString?

The namespace of the function to run.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :namespace, String

#statusSymbol, ...

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



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

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

#typeSymbol, :function_call

The type of the function tool call. Always function_call.

Parameters:

  • value (:function_call)

Returns:

  • (Symbol, :function_call)


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

required :type, const: :function_call

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {