Class: OpenAI::Models::Beta::BetaResponseComputerToolCall

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

Defined Under Namespace

Modules: Status, Type Classes: Agent, PendingSafetyCheck

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:, code: nil, message: nil) ⇒ BetaResponseComputerToolCall

Returns a new instance of BetaResponseComputerToolCall.

Parameters:

  • id —

    The unique ID of the computer call.

  • call_id —

    An identifier used when responding to the tool call with output.

  • pending_safety_checks —

    The pending safety checks for the computer call.

  • status —

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

  • type —

    The type of the computer call. Always computer_call.

  • action —

    A click action.

  • actions —

    Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

  • agent —

    The agent that produced this item.

  • id: (String)
  • call_id: (String)
  • pending_safety_checks: (::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck])
  • status: (OpenAI::Models::Beta::BetaResponseComputerToolCall::status)
  • type: (OpenAI::Models::Beta::BetaResponseComputerToolCall::type_)
  • action: (OpenAI::Models::Beta::beta_computer_action)
  • actions: (OpenAI::Models::Beta::beta_computer_action_list)
  • agent: (OpenAI::Beta::BetaResponseComputerToolCall::Agent, nil)


# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 109

Instance Attribute Details

#action ⇒ OpenAI::Models::Beta::beta_computer_action?

A click action.

Returns:

  • (OpenAI::Models::Beta::beta_computer_action, nil)


45
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 45

optional :action, union: -> { OpenAI::Beta::BetaComputerAction }

#actions ⇒ OpenAI::Models::Beta::beta_computer_action_list?

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

Returns:

  • (OpenAI::Models::Beta::beta_computer_action_list, nil)


52
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 52

optional :actions, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::BetaComputerAction] }

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

The agent that produced this item.

Returns:

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


58
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 58

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

#call_id ⇒ String

An identifier used when responding to the tool call with output.

Returns:

  • (String)


17
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 17

required :call_id, String

#id ⇒ String

The unique ID of the computer call.

Returns:

  • (String)


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

required :id, String

#pending_safety_checks ⇒ ::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck]

The pending safety checks for the computer call.

Returns:

  • (::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck])


23
24
25
26
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 23

required(
  :pending_safety_checks,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck] }
)

#status ⇒ OpenAI::Models::Beta::BetaResponseComputerToolCall::status

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

Returns:

  • (OpenAI::Models::Beta::BetaResponseComputerToolCall::status)


33
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 33

required :status, enum: -> { OpenAI::Beta::BetaResponseComputerToolCall::Status }

#type ⇒ OpenAI::Models::Beta::BetaResponseComputerToolCall::type_

The type of the computer call. Always computer_call.

Returns:

  • (OpenAI::Models::Beta::BetaResponseComputerToolCall::type_)


39
# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 39

required :type, enum: -> { OpenAI::Beta::BetaResponseComputerToolCall::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_computer_tool_call.rb', line 133

Instance Method Details

#to_hash ⇒ { id: String, call_id: String, pending_safety_checks: ::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck], status: OpenAI::Models::Beta::BetaResponseComputerToolCall::status, type: OpenAI::Models::Beta::BetaResponseComputerToolCall::type_, ?action: OpenAI::Models::Beta::beta_computer_action, ?actions: OpenAI::Models::Beta::beta_computer_action_list, ?agent: OpenAI::Beta::BetaResponseComputerToolCall::Agent? }

Returns:

  • ({ id: String, call_id: String, pending_safety_checks: ::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck], status: OpenAI::Models::Beta::BetaResponseComputerToolCall::status, type: OpenAI::Models::Beta::BetaResponseComputerToolCall::type_, ?action: OpenAI::Models::Beta::beta_computer_action, ?actions: OpenAI::Models::Beta::beta_computer_action_list, ?agent: OpenAI::Beta::BetaResponseComputerToolCall::Agent? })


85
86
87
88
89
90
91
92
93
94
# File 'sig/openai/models/beta/beta_response_computer_tool_call.rbs', line 85

def to_hash: -> {
  id: String,
  call_id: String,
  pending_safety_checks: ::Array[OpenAI::Beta::BetaResponseComputerToolCall::PendingSafetyCheck],
  status: OpenAI::Models::Beta::BetaResponseComputerToolCall::status,
  type: OpenAI::Models::Beta::BetaResponseComputerToolCall::type_,
  ?action: OpenAI::Models::Beta::beta_computer_action,
  ?actions: OpenAI::Models::Beta::beta_computer_action_list,
  ?agent: OpenAI::Beta::BetaResponseComputerToolCall::Agent?
}