Class: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput

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

Direct Known Subclasses

BetaResponseCustomToolCallOutputItem

Defined Under Namespace

Modules: Caller, Output Classes: Agent

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(agent_name:) ⇒ BetaResponseCustomToolCallOutput

Returns a new instance of BetaResponseCustomToolCallOutput.

Parameters:

  • call_id —

    The call ID, used to map this custom tool call output to a custom tool call.

  • output —

    The output from the custom tool call generated by your code. Can be a string or an list of output content.

  • id —

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

  • agent —

    The agent that produced this item.

  • caller_ —

    The execution context that produced this tool call.

  • type —

    The type of the custom tool call output. Always custom_tool_call_output.

  • call_id: (String)
  • output: (OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output)
  • id: (String)
  • agent: (OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent, nil)
  • caller_: (OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_, nil)
  • type: (:custom_tool_call_output)


# File 'lib/openai/models/beta/beta_response_custom_tool_call_output.rb', line 49

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent, nil)


36
# File 'lib/openai/models/beta/beta_response_custom_tool_call_output.rb', line 36

optional :agent, -> { OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent }, nil?: true

#call_id ⇒ String

The call ID, used to map this custom tool call output to a custom tool call.

Returns:

  • (String)


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

required :call_id, String

#caller_ ⇒ OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_, nil)


42
43
44
45
46
47
# File 'lib/openai/models/beta/beta_response_custom_tool_call_output.rb', line 42

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

#id ⇒ String?

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

Returns:

  • (String, nil)


30
# File 'lib/openai/models/beta/beta_response_custom_tool_call_output.rb', line 30

optional :id, String

#output ⇒ OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output

The output from the custom tool call generated by your code. Can be a string or an list of output content.

Returns:

  • (OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output)


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

required :output, union: -> { OpenAI::Beta::BetaResponseCustomToolCallOutput::Output }

#type ⇒ :custom_tool_call_output

The type of the custom tool call output. Always custom_tool_call_output.

Returns:

  • (:custom_tool_call_output)


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

required :type, const: :custom_tool_call_output

Instance Method Details

#to_hash ⇒ { call_id: String, output: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output, ?type: :custom_tool_call_output, ?id: String, ?agent: OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent?, ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_? }

Returns:

  • ({ call_id: String, output: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output, ?type: :custom_tool_call_output, ?id: String, ?agent: OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent?, ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_? })


61
62
63
64
65
66
67
68
# File 'sig/openai/models/beta/beta_response_custom_tool_call_output.rbs', line 61

def to_hash: -> {
  call_id: String,
  output: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::output,
  ?type: :custom_tool_call_output,
  ?id: String,
  ?agent: OpenAI::Beta::BetaResponseCustomToolCallOutput::Agent?,
  ?caller_: OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::caller_?
}