Class: OpenAI::Models::Beta::BetaFunctionShellTool

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

Defined Under Namespace

Modules: AllowedCaller, Environment

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

Returns a new instance of BetaFunctionShellTool.

Parameters:

  • allowed_callers —

    The tool invocation context(s).

  • type —

    The type of the shell tool. Always shell.

  • allowed_callers: (::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller], nil)
  • environment: (OpenAI::Models::Beta::BetaFunctionShellTool::environment, nil)
  • type: (:shell)


26
27
28
29
30
# File 'sig/openai/models/beta/beta_function_shell_tool.rbs', line 26

def initialize: (
  ?allowed_callers: ::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller]?,
  ?environment: OpenAI::Models::Beta::BetaFunctionShellTool::environment?,
  ?type: :shell
) -> void

Instance Attribute Details

#allowed_callers ⇒ ::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller]?

The tool invocation context(s).

Returns:

  • (::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller], nil)


17
18
19
20
21
22
23
# File 'lib/openai/models/beta/beta_function_shell_tool.rb', line 17

optional(
  :allowed_callers,
  -> {
    OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::BetaFunctionShellTool::AllowedCaller]
  },
  nil?: true
)

#environment ⇒ OpenAI::Models::Beta::BetaContainerAuto, ...

Parameters:

  • value (OpenAI::Models::Beta::BetaFunctionShellTool::environment, nil)

Returns:



28
# File 'lib/openai/models/beta/beta_function_shell_tool.rb', line 28

optional :environment, union: -> { OpenAI::Beta::BetaFunctionShellTool::Environment }, nil?: true

#type ⇒ :shell

The type of the shell tool. Always shell.

Returns:

  • (:shell)


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

required :type, const: :shell

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_function_shell_tool.rb', line 46

Instance Method Details

#to_hash ⇒ { ?type: :shell, ?allowed_callers: ::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller]?, ?environment: OpenAI::Models::Beta::BetaFunctionShellTool::environment? }

Returns:

  • ({ ?type: :shell, ?allowed_callers: ::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller]?, ?environment: OpenAI::Models::Beta::BetaFunctionShellTool::environment? })


32
33
34
35
36
# File 'sig/openai/models/beta/beta_function_shell_tool.rbs', line 32

def to_hash: -> {
  ?type: :shell,
  ?allowed_callers: ::Array[OpenAI::Models::Beta::BetaFunctionShellTool::allowed_caller]?,
  ?environment: OpenAI::Models::Beta::BetaFunctionShellTool::environment?
}