Class: OpenAI::Models::Responses::ResponseComputerToolCallOutputItem

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

Defined Under Namespace

Modules: Status Classes: AcknowledgedSafetyCheck

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_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(id:, call_id:, output:, status:, acknowledged_safety_checks: nil, created_by: nil, type: :computer_call_output) ⇒ ResponseComputerToolCallOutputItem

Returns a new instance of ResponseComputerToolCallOutputItem.

Parameters:

  • id —

    The ID of the computer tool call output.

  • call_id —

    The ID of the computer tool call that produced the output.

  • output —

    A computer screenshot image used with the computer use tool.

  • status —

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

  • acknowledged_safety_checks (defaults to: nil) —

    The safety checks reported by the API that have been acknowledged by the developer.

  • created_by (defaults to: nil) —

    The identifier of the actor that created the item.

  • type (defaults to: :computer_call_output) —

    The type of the computer tool call output. Always computer_call_output.

  • id: (String)
  • call_id: (String)
  • output: (OpenAI::Responses::ResponseComputerToolCallOutputScreenshot)
  • status: (OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::status)
  • acknowledged_safety_checks: (::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck]) (defaults to: nil)
  • created_by: (String) (defaults to: nil)
  • type: (:computer_call_output) (defaults to: :computer_call_output)


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

Instance Attribute Details

#acknowledged_safety_checks ⇒ ::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck]?

The safety checks reported by the API that have been acknowledged by the developer.

Returns:

  • (::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck], nil)


43
44
45
46
47
48
49
50
# File 'lib/openai/models/responses/response_computer_tool_call_output_item.rb', line 43

optional(
  :acknowledged_safety_checks,
  -> {
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck
    ]
  }
)

#call_id ⇒ String

The ID of the computer tool call that produced the output.

Returns:

  • (String)


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

required :call_id, String

#created_by ⇒ String?

The identifier of the actor that created the item.

Returns:

  • (String, nil)


56
# File 'lib/openai/models/responses/response_computer_tool_call_output_item.rb', line 56

optional :created_by, String

#id ⇒ String

The ID of the computer tool call output.

Returns:

  • (String)


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

required :id, String

#output ⇒ OpenAI::Responses::ResponseComputerToolCallOutputScreenshot

A computer screenshot image used with the computer use tool.

Returns:

  • (OpenAI::Responses::ResponseComputerToolCallOutputScreenshot)


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

required :output, -> { OpenAI::Responses::ResponseComputerToolCallOutputScreenshot }

#status ⇒ OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::status

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

Returns:

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


30
# File 'lib/openai/models/responses/response_computer_tool_call_output_item.rb', line 30

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

#type ⇒ :computer_call_output

The type of the computer tool call output. Always computer_call_output.

Returns:

  • (:computer_call_output)


36
# File 'lib/openai/models/responses/response_computer_tool_call_output_item.rb', line 36

required :type, const: :computer_call_output

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/response_computer_tool_call_output_item.rb', line 94

Instance Method Details

#to_hash ⇒ { id: String, call_id: String, output: OpenAI::Responses::ResponseComputerToolCallOutputScreenshot, status: OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::status, ?type: :computer_call_output, ?acknowledged_safety_checks: ::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck], ?created_by: String }

Returns:

  • ({ id: String, call_id: String, output: OpenAI::Responses::ResponseComputerToolCallOutputScreenshot, status: OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::status, ?type: :computer_call_output, ?acknowledged_safety_checks: ::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck], ?created_by: String })


74
75
76
77
78
79
80
81
82
# File 'sig/openai/models/responses/response_computer_tool_call_output_item.rbs', line 74

def to_hash: -> {
  id: String,
  call_id: String,
  output: OpenAI::Responses::ResponseComputerToolCallOutputScreenshot,
  status: OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::status,
  ?type: :computer_call_output,
  ?acknowledged_safety_checks: ::Array[OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck],
  ?created_by: String
}