Class: OpenAI::Models::Responses::ResponseCustomToolCallOutputItem

Inherits:
ResponseCustomToolCallOutput show all
Defined in:
lib/openai/models/responses/response_custom_tool_call_output_item.rb,
sig/openai/models/responses/response_custom_tool_call_output_item.rbs

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Attributes inherited from ResponseCustomToolCallOutput

#call_id, #caller_, #output, #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:, output:, id:, status:, caller_: nil, created_by: nil, type: :custom_tool_call_output) ⇒ ResponseCustomToolCallOutputItem

Returns a new instance of ResponseCustomToolCallOutputItem.

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

  • status —

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

  • caller_ (defaults to: nil) —

    The execution context that produced this tool call.

  • created_by (defaults to: nil) —

    The identifier of the actor that created the item.

  • type (defaults to: :custom_tool_call_output) —

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

  • call_id: (String)
  • output: (OpenAI::Models::Responses::ResponseCustomToolCallOutput::output)
  • id: (String)
  • status: (OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status)
  • caller_: (OpenAI::Models::Responses::ResponseCustomToolCallOutput::caller_, nil) (defaults to: nil)
  • created_by: (String) (defaults to: nil)
  • type: (:custom_tool_call_output) (defaults to: :custom_tool_call_output)


# File 'lib/openai/models/responses/response_custom_tool_call_output_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/responses/response_custom_tool_call_output_item.rb', line 24

optional :created_by, String

#id ⇒ String

The unique ID of the custom tool call output item.

Returns:

  • (String)


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

required :id, String

#status ⇒ OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status

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

Returns:

  • (OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status)


18
# File 'lib/openai/models/responses/response_custom_tool_call_output_item.rb', line 18

required :status, enum: -> { OpenAI::Responses::ResponseCustomToolCallOutputItem::Status }

Instance Method Details

#to_hash ⇒ { call_id: String, output: OpenAI::Models::Responses::ResponseCustomToolCallOutput::output, id: String, status: OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status, ?type: :custom_tool_call_output, ?caller_: OpenAI::Models::Responses::ResponseCustomToolCallOutput::caller_?, ?created_by: String }

Returns:

  • ({ call_id: String, output: OpenAI::Models::Responses::ResponseCustomToolCallOutput::output, id: String, status: OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status, ?type: :custom_tool_call_output, ?caller_: OpenAI::Models::Responses::ResponseCustomToolCallOutput::caller_?, ?created_by: String })


64
65
66
67
68
69
70
71
72
# File 'sig/openai/models/responses/response_custom_tool_call_output_item.rbs', line 64

def to_hash: -> {
  call_id: String,
  output: OpenAI::Models::Responses::ResponseCustomToolCallOutput::output,
  id: String,
  status: OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::status,
  ?type: :custom_tool_call_output,
  ?caller_: OpenAI::Models::Responses::ResponseCustomToolCallOutput::caller_?,
  ?created_by: String
}