Class: OpenAI::Models::Beta::BetaResponseInputItem::ShellCall

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

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

  • agent —

    The agent that produced this item.

  • 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::Beta::BetaResponseInputItem::ShellCall::Action)
  • call_id: (String)
  • id: (String, nil)
  • agent: (OpenAI::Beta::BetaResponseInputItem::ShellCall::Agent, nil)
  • caller_: (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::caller_, nil)
  • environment: (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::environment, nil)
  • status: (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::status, nil)
  • type: (:shell_call) (defaults to: :program)


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

Instance Attribute Details

#action ⇒ OpenAI::Beta::BetaResponseInputItem::ShellCall::Action

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

Returns:

  • (OpenAI::Beta::BetaResponseInputItem::ShellCall::Action)


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

required :action, -> { OpenAI::Beta::BetaResponseInputItem::ShellCall::Action }

#agent ⇒ OpenAI::Beta::BetaResponseInputItem::ShellCall::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseInputItem::ShellCall::Agent, nil)


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

optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::ShellCall::Agent }, nil?: true

#call_id ⇒ String

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

Returns:

  • (String)


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

required :call_id, String

#caller_ ⇒ OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::caller_, nil)


1946
1947
1948
1949
1950
1951
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1946

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

#environment ⇒ OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::environment?

The environment to execute the shell commands in.

Returns:

  • (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::environment, nil)


1957
1958
1959
1960
1961
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1957

optional(
  :environment,
  union: -> { OpenAI::Beta::BetaResponseInputItem::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)


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

optional :id, String, nil?: true

#status ⇒ OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::status?

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

Returns:

  • (OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::status, nil)


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

optional :status, enum: -> { OpenAI::Beta::BetaResponseInputItem::ShellCall::Status }, nil?: true

#type ⇒ :shell_call

The type of the item. Always shell_call.

Returns:

  • (:shell_call)


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

required :type, const: :shell_call

Class Method Details

.variants ⇒ Array(OpenAI::Models::Beta::BetaLocalEnvironment, OpenAI::Models::Beta::BetaContainerReference)



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

Instance Method Details

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

Returns:

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


1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 1768

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