Class: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput

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, Status

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.

  • 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::Responses::ResponseFunctionShellCallOutputContent])
  • id: (String, nil)
  • caller_: (OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::caller_, nil)
  • max_output_length: (Integer, nil)
  • status: (OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::status, nil)
  • type: (:shell_call_output) (defaults to: :program)


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

Instance Attribute Details

#call_id ⇒ String

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

Returns:

  • (String)


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

required :call_id, String

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

The execution context that produced this tool call.

Returns:

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


1427
1428
1429
1430
1431
1432
# File 'lib/openai/models/responses/response_input_item.rb', line 1427

optional(
  :caller_,
  union: -> { OpenAI::Responses::ResponseInputItem::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)


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

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)


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

optional :max_output_length, Integer, nil?: true

#output ⇒ ::Array[OpenAI::Responses::ResponseFunctionShellCallOutputContent]

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

Returns:

  • (::Array[OpenAI::Responses::ResponseFunctionShellCallOutputContent])


1405
1406
1407
1408
# File 'lib/openai/models/responses/response_input_item.rb', line 1405

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

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

The status of the shell call output.

Returns:

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


1445
1446
1447
1448
1449
1450
1451
# File 'lib/openai/models/responses/response_input_item.rb', line 1445

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

#type ⇒ :shell_call_output

The type of the item. Always shell_call_output.

Returns:

  • (:shell_call_output)


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

required :type, const: :shell_call_output

Class Method Details

.variants ⇒ Array(OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Program)



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

Instance Method Details

#to_hash ⇒ { call_id: String, output: ::Array[OpenAI::Responses::ResponseFunctionShellCallOutputContent], ?type: :shell_call_output, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::caller_?, ?max_output_length: Integer?, ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::status? }

Returns:

  • ({ call_id: String, output: ::Array[OpenAI::Responses::ResponseFunctionShellCallOutputContent], ?type: :shell_call_output, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::caller_?, ?max_output_length: Integer?, ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::status? })


1258
1259
1260
1261
1262
1263
1264
1265
1266
# File 'sig/openai/models/responses/response_input_item.rbs', line 1258

def to_hash: -> {
  call_id: String,
  output: ::Array[OpenAI::Responses::ResponseFunctionShellCallOutputContent],
  ?type: :shell_call_output,
  ?id: String?,
  ?caller_: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::caller_?,
  ?max_output_length: Integer?,
  ?status: OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::status?
}