Class: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput

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, Status Classes: 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) ⇒ ShellCallOutput

Returns a new instance of ShellCallOutput.

Parameters:

  • call_id —

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

  • output —

    Captured chunks of stdout and stderr output, along with their associated outcomes.

  • id —

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

  • agent —

    The agent that produced this item.

  • caller_ —

    The execution context that produced this tool call.

  • max_output_length —

    The maximum number of UTF-8 characters captured for this shell call's combined output.

  • status —

    The status of the shell call output.

  • type (defaults to: :program) —

    The type of the item. Always shell_call_output.

  • call_id: (String)
  • output: (::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent])
  • id: (String, nil)
  • agent: (OpenAI::Beta::BetaResponseInputItem::ShellCallOutput::Agent, nil)
  • caller_: (OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::caller_, nil)
  • max_output_length: (Integer, nil)
  • status: (OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::status, nil)
  • type: (:shell_call_output) (defaults to: :program)


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

Instance Attribute Details

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

The agent that produced this item.

Returns:

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


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

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

#call_id ⇒ String

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

Returns:

  • (String)


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

required :call_id, String

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

The execution context that produced this tool call.

Returns:

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


2170
2171
2172
2173
2174
2175
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 2170

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

#id ⇒ String?

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

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#max_output_length ⇒ Integer?

The maximum number of UTF-8 characters captured for this shell call's combined output.

Returns:

  • (Integer, nil)


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

optional :max_output_length, Integer, nil?: true

#output ⇒ ::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent]

Captured chunks of stdout and stderr output, along with their associated outcomes.

Returns:

  • (::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent])


2142
2143
2144
2145
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 2142

required(
  :output,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent] }
)

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

The status of the shell call output.

Returns:

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


2188
2189
2190
2191
2192
2193
2194
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 2188

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

#type ⇒ :shell_call_output

The type of the item. Always shell_call_output.

Returns:

  • (:shell_call_output)


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

required :type, const: :shell_call_output

Class Method Details

.variants ⇒ Array(OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Program)



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

Instance Method Details

#to_hash ⇒ { call_id: String, output: ::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent], ?type: :shell_call_output, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::ShellCallOutput::Agent?, ?caller_: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::caller_?, ?max_output_length: Integer?, ?status: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::status? }

Returns:

  • ({ call_id: String, output: ::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent], ?type: :shell_call_output, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::ShellCallOutput::Agent?, ?caller_: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::caller_?, ?max_output_length: Integer?, ?status: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::status? })


1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 1964

def to_hash: -> {
  call_id: String,
  output: ::Array[OpenAI::Beta::BetaResponseFunctionShellCallOutputContent],
  ?type: :shell_call_output,
  ?id: String?,
  ?agent: OpenAI::Beta::BetaResponseInputItem::ShellCallOutput::Agent?,
  ?caller_: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::caller_?,
  ?max_output_length: Integer?,
  ?status: OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::status?
}