Class: OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Action

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

Overview

See Also:

  • OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall#action

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 ⇒ Action

Returns a new instance of Action.

Parameters:

  • command —

    The command to run.

  • env —

    Environment variables to set for the command.

  • timeout_ms —

    Optional timeout in milliseconds for the command.

  • user —

    Optional user to run the command as.

  • working_directory —

    Optional working directory to run the command in.

  • type —

    The type of the local shell action. Always exec.

  • command: (::Array[String])
  • env: (::Hash[Symbol, String])
  • timeout_ms: (Integer, nil)
  • user: (String, nil)
  • working_directory: (String, nil)
  • type: (:exec)


1578
1579
1580
1581
1582
1583
1584
1585
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 1578

def initialize: (
  command: ::Array[String],
  env: ::Hash[Symbol, String],
  ?timeout_ms: Integer?,
  ?user: String?,
  ?working_directory: String?,
  ?type: :exec
) -> void

Instance Attribute Details

#command ⇒ ::Array[String]

The command to run.

Returns:

  • (::Array[String])


1743
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1743

required :command, OpenAI::Internal::Type::ArrayOf[String]

#env ⇒ ::Hash[Symbol, String]

Environment variables to set for the command.

Returns:

  • (::Hash[Symbol, String])


1749
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1749

required :env, OpenAI::Internal::Type::HashOf[String]

#timeout_ms ⇒ Integer?

Optional timeout in milliseconds for the command.

Returns:

  • (Integer, nil)


1761
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1761

optional :timeout_ms, Integer, nil?: true

#type ⇒ :exec

The type of the local shell action. Always exec.

Returns:

  • (:exec)


1755
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1755

required :type, const: :exec

#user ⇒ String?

Optional user to run the command as.

Returns:

  • (String, nil)


1767
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1767

optional :user, String, nil?: true

#working_directory ⇒ String?

Optional working directory to run the command in.

Returns:

  • (String, nil)


1773
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1773

optional :working_directory, String, nil?: true

Instance Method Details

#to_hash ⇒ { command: ::Array[String], env: ::Hash[Symbol, String], ?type: :exec, ?timeout_ms: Integer?, ?user: String?, ?working_directory: String? }

Returns:

  • ({ command: ::Array[String], env: ::Hash[Symbol, String], ?type: :exec, ?timeout_ms: Integer?, ?user: String?, ?working_directory: String? })


1587
1588
1589
1590
1591
1592
1593
1594
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 1587

def to_hash: -> {
  command: ::Array[String],
  env: ::Hash[Symbol, String],
  ?type: :exec,
  ?timeout_ms: Integer?,
  ?user: String?,
  ?working_directory: String?
}