Class: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall

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

Defined Under Namespace

Modules: Caller, Environment, Status Classes: Action, Agent

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(agent_name:) ⇒ BetaResponseFunctionShellToolCall

Returns a new instance of BetaResponseFunctionShellToolCall.

Parameters:

  • id —

    The unique ID of the shell tool call. Populated when this item is returned via API.

  • action —

    The shell commands and limits that describe how to run the tool call.

  • call_id —

    The unique ID of the shell tool call generated by the model.

  • environment —

    Represents the use of a local environment to perform shell actions.

  • status —

    The status of the shell call. One of in_progress, completed, or incomplete.

  • agent —

    The agent that produced this item.

  • caller_ —

    The execution context that produced this tool call.

  • created_by —

    The ID of the entity that created this tool call.

  • type —

    The type of the item. Always shell_call.

  • id: (String)
  • action: (OpenAI::Beta::BetaResponseFunctionShellToolCall::Action)
  • call_id: (String)
  • environment: (OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment, nil)
  • status: (OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::status)
  • agent: (OpenAI::Beta::BetaResponseFunctionShellToolCall::Agent)
  • caller_: (OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_, nil)
  • created_by: (String)
  • type: (:shell_call)


# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 72

Instance Attribute Details

#action ⇒ OpenAI::Beta::BetaResponseFunctionShellToolCall::Action

The shell commands and limits that describe how to run the tool call.

Returns:

  • (OpenAI::Beta::BetaResponseFunctionShellToolCall::Action)


18
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 18

required :action, -> { OpenAI::Beta::BetaResponseFunctionShellToolCall::Action }

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

The agent that produced this item.

Returns:

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


53
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 53

optional :agent, -> { OpenAI::Beta::BetaResponseFunctionShellToolCall::Agent }

#call_id ⇒ String

The unique ID of the shell tool call generated by the model.

Returns:

  • (String)


24
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 24

required :call_id, String

#caller_ ⇒ OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_, nil)


59
60
61
62
63
64
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 59

optional(
  :caller_,
  union: -> { OpenAI::Beta::BetaResponseFunctionShellToolCall::Caller },
  api_name: :caller,
  nil?: true
)

#created_by ⇒ String?

The ID of the entity that created this tool call.

Returns:

  • (String, nil)


70
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 70

optional :created_by, String

#environment ⇒ OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment?

Represents the use of a local environment to perform shell actions.

Returns:

  • (OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment, nil)


30
31
32
33
34
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 30

required(
  :environment,
  union: -> { OpenAI::Beta::BetaResponseFunctionShellToolCall::Environment },
  nil?: true
)

#id ⇒ String

The unique ID of the shell tool call. Populated when this item is returned via API.

Returns:

  • (String)


12
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 12

required :id, String

#status ⇒ OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::status

The status of the shell call. One of in_progress, completed, or incomplete.

Returns:

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


41
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 41

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

#type ⇒ :shell_call

The type of the item. Always shell_call.

Returns:

  • (:shell_call)


47
# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 47

required :type, const: :shell_call

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 164

.variants ⇒ Array(OpenAI::Models::Beta::BetaResponseLocalEnvironment, OpenAI::Models::Beta::BetaResponseContainerReference)



# File 'lib/openai/models/beta/beta_response_function_shell_tool_call.rb', line 149

Instance Method Details

#to_hash ⇒ { id: String, action: OpenAI::Beta::BetaResponseFunctionShellToolCall::Action, call_id: String, environment: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment?, status: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::status, ?type: :shell_call, ?agent: OpenAI::Beta::BetaResponseFunctionShellToolCall::Agent, ?caller_: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_?, ?created_by: String }

Returns:

  • ({ id: String, action: OpenAI::Beta::BetaResponseFunctionShellToolCall::Action, call_id: String, environment: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment?, status: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::status, ?type: :shell_call, ?agent: OpenAI::Beta::BetaResponseFunctionShellToolCall::Agent, ?caller_: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_?, ?created_by: String })


89
90
91
92
93
94
95
96
97
98
99
# File 'sig/openai/models/beta/beta_response_function_shell_tool_call.rbs', line 89

def to_hash: -> {
  id: String,
  action: OpenAI::Beta::BetaResponseFunctionShellToolCall::Action,
  call_id: String,
  environment: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::environment?,
  status: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::status,
  ?type: :shell_call,
  ?agent: OpenAI::Beta::BetaResponseFunctionShellToolCall::Agent,
  ?caller_: OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::caller_?,
  ?created_by: String
}