Class: OpenAI::Models::Responses::ResponseInputItem::ShellCall

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

Defined Under Namespace

Modules: Caller, Environment, Status Classes: Action

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(caller_id:, type: :program) ⇒ ShellCall

Returns a new instance of ShellCall.

Parameters:

  • 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.

  • id —

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

  • caller_ —

    The execution context that produced this tool call.

  • environment —

    The environment to execute the shell commands in.

  • status —

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

  • type (defaults to: :program) —

    The type of the item. Always shell_call.

  • action: (OpenAI::Responses::ResponseInputItem::ShellCall::Action)
  • call_id: (String)
  • id: (String, nil)
  • caller_: (OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_, nil)
  • environment: (OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment, nil)
  • status: (OpenAI::Models::Responses::ResponseInputItem::ShellCall::status, nil)
  • type: (:shell_call) (defaults to: :program)


# File 'lib/openai/models/responses/response_input_item.rb', line 1251

Instance Attribute Details

#action ⇒ OpenAI::Responses::ResponseInputItem::ShellCall::Action

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

Returns:

  • (OpenAI::Responses::ResponseInputItem::ShellCall::Action)


1202
# File 'lib/openai/models/responses/response_input_item.rb', line 1202

required :action, -> { OpenAI::Responses::ResponseInputItem::ShellCall::Action }

#call_id ⇒ String

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

Returns:

  • (String)


1208
# File 'lib/openai/models/responses/response_input_item.rb', line 1208

required :call_id, String

#caller_ ⇒ OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_, nil)


1227
1228
1229
1230
1231
1232
# File 'lib/openai/models/responses/response_input_item.rb', line 1227

optional(
  :caller_,
  union: -> { OpenAI::Responses::ResponseInputItem::ShellCall::Caller },
  api_name: :caller,
  nil?: true
)

#environment ⇒ OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment?

The environment to execute the shell commands in.

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment, nil)


1238
1239
1240
1241
1242
# File 'lib/openai/models/responses/response_input_item.rb', line 1238

optional(
  :environment,
  union: -> { OpenAI::Responses::ResponseInputItem::ShellCall::Environment },
  nil?: true
)

#id ⇒ String?

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

Returns:

  • (String, nil)


1221
# File 'lib/openai/models/responses/response_input_item.rb', line 1221

optional :id, String, nil?: true

#status ⇒ OpenAI::Models::Responses::ResponseInputItem::ShellCall::status?

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

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ShellCall::status, nil)


1249
# File 'lib/openai/models/responses/response_input_item.rb', line 1249

optional :status, enum: -> { OpenAI::Responses::ResponseInputItem::ShellCall::Status }, nil?: true

#type ⇒ :shell_call

The type of the item. Always shell_call.

Returns:

  • (:shell_call)


1214
# File 'lib/openai/models/responses/response_input_item.rb', line 1214

required :type, const: :shell_call

Class Method Details

.variants ⇒ Array(OpenAI::Models::Responses::LocalEnvironment, OpenAI::Models::Responses::ContainerReference)



# File 'lib/openai/models/responses/response_input_item.rb', line 1357

Instance Method Details

#to_hash ⇒ { action: OpenAI::Responses::ResponseInputItem::ShellCall::Action, call_id: String, ?type: :shell_call, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_?, ?environment: OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment?, ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCall::status? }

Returns:

  • ({ action: OpenAI::Responses::ResponseInputItem::ShellCall::Action, call_id: String, ?type: :shell_call, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_?, ?environment: OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment?, ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCall::status? })


1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'sig/openai/models/responses/response_input_item.rbs', line 1083

def to_hash: -> {
  action: OpenAI::Responses::ResponseInputItem::ShellCall::Action,
  call_id: String,
  ?type: :shell_call,
  ?id: String?,
  ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCall::caller_?,
  ?environment: OpenAI::Models::Responses::ResponseInputItem::ShellCall::environment?,
  ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCall::status?
}