Class: OpenAI::Models::Responses::FunctionShellTool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/function_shell_tool.rb,
sig/openai/models/responses/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 ⇒ FunctionShellTool

Returns a new instance of FunctionShellTool.

Parameters:

  • allowed_callers —

    The tool invocation context(s).

  • type —

    The type of the shell tool. Always shell.

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


24
25
26
27
28
# File 'sig/openai/models/responses/function_shell_tool.rbs', line 24

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

Instance Attribute Details

#allowed_callers ⇒ ::Array[OpenAI::Models::Responses::FunctionShellTool::allowed_caller]?

The tool invocation context(s).

Returns:

  • (::Array[OpenAI::Models::Responses::FunctionShellTool::allowed_caller], nil)


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

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

#environment ⇒ OpenAI::Models::Responses::ContainerAuto, ...

Parameters:

  • value (OpenAI::Models::Responses::FunctionShellTool::environment, nil)

Returns:



28
# File 'lib/openai/models/responses/function_shell_tool.rb', line 28

optional :environment, union: -> { OpenAI::Responses::FunctionShellTool::Environment }, nil?: true

#type ⇒ :shell

The type of the shell tool. Always shell.

Returns:

  • (:shell)


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

required :type, const: :shell

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/function_shell_tool.rb', line 46

Instance Method Details

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

Returns:

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


30
31
32
33
34
# File 'sig/openai/models/responses/function_shell_tool.rbs', line 30

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