Class: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest

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

Defined Under Namespace

Modules: Request

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_with_error, 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(request:, request_id:, turn_id:, type: :computer_use_approval_request) ⇒ Object

Parameters:

  • request —

    The information needed to render the request.

  • request_id —

    The registered request ID to echo when responding.

  • turn_id —

    The turn that requested approval.

  • type (defaults to: :computer_use_approval_request) —

    The type of the object. Always computer_use_approval_request.



# File 'lib/openai/models/beta/agent_session.rb', line 275


Instance Attribute Details

#request ⇒ OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request

The information needed to render the request.

Returns:

  • (OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request)


252
253
254
255
# File 'lib/openai/models/beta/agent_session.rb', line 252

required(
  :request,
  union: -> { OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request }
)

#request_id ⇒ String

The registered request ID to echo when responding.

Returns:

  • (String)


261
# File 'lib/openai/models/beta/agent_session.rb', line 261

required :request_id, String

#turn_id ⇒ String

The turn that requested approval.

Returns:

  • (String)


267
# File 'lib/openai/models/beta/agent_session.rb', line 267

required :turn_id, String

#type ⇒ :computer_use_approval_request

The type of the object. Always computer_use_approval_request.

Returns:

  • (:computer_use_approval_request)


273
# File 'lib/openai/models/beta/agent_session.rb', line 273

required :type, const: :computer_use_approval_request

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


259
# File 'sig/openai/models/beta/agent_session.rbs', line 259

def to_hash: -> {