Class: OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput

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

Defined Under Namespace

Modules: Caller, Status Classes: Output

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(exit_code:, type: :exit) ⇒ ResponseFunctionShellToolCallOutput

Returns a new instance of ResponseFunctionShellToolCallOutput.

Parameters:

  • id —

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

  • call_id —

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

  • max_output_length —

    The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

  • output —

    An array of shell call output contents

  • status —

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

  • caller_ —

    The execution context that produced this tool call.

  • created_by —

    The identifier of the actor that created the item.

  • type (defaults to: :exit) —

    The type of the shell call output. Always shell_call_output.

  • id: (String)
  • call_id: (String)
  • max_output_length: (Integer, nil)
  • output: (::Array[OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output])
  • status: (OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::status)
  • caller_: (OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::caller_, nil)
  • created_by: (String)
  • type: (:shell_call_output) (defaults to: :exit)


# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 179

Instance Attribute Details

#call_id ⇒ String

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

Returns:

  • (String)


18
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 18

required :call_id, String

#caller_ ⇒ OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::caller_, nil)


53
54
55
56
57
58
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 53

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

#created_by ⇒ String?

The identifier of the actor that created the item.

Returns:

  • (String, nil)


64
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 64

optional :created_by, String

#id ⇒ String

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

Returns:

  • (String)


12
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 12

required :id, String

#max_output_length ⇒ Integer?

The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.

Returns:

  • (Integer, nil)


25
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 25

required :max_output_length, Integer, nil?: true

#output ⇒ ::Array[OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output]

An array of shell call output contents

Returns:

  • (::Array[OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output])


31
32
33
34
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 31

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

#status ⇒ OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::status

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

Returns:

  • (OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::status)


41
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 41

required :status, enum: -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status }

#type ⇒ :shell_call_output

The type of the shell call output. Always shell_call_output.

Returns:

  • (:shell_call_output)


47
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 47

required :type, const: :shell_call_output

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 205

.variants ⇒ Array(OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit)



# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 189

Instance Method Details

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

Returns:

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


77
78
79
80
81
82
83
84
85
86
# File 'sig/openai/models/responses/response_function_shell_tool_call_output.rbs', line 77

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