Class: OpenAI::Models::Responses::ResponseCodeInterpreterToolCall

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

Defined Under Namespace

Modules: Output, 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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(url:, type: :image) ⇒ Object

Parameters:

  • id

    The unique ID of the code interpreter tool call.

  • code

    The code to run, or null if not available.

  • container_id

    The ID of the container used to run the code.

  • outputs

    The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

  • status

    The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

  • type (defaults to: :image)

    The type of the code interpreter tool call. Always code_interpreter_call.



# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 51

Instance Attribute Details

#codeString?

The code to run, or null if not available.

Returns:

  • (String, nil)


17
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 17

required :code, String, nil?: true

#container_idString

The ID of the container used to run the code.

Returns:

  • (String)


23
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 23

required :container_id, String

#idString

The unique ID of the code interpreter tool call.

Returns:

  • (String)


11
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 11

required :id, String

#outputs::Array[OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::output]?

The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available.

Returns:

  • (::Array[OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::output], nil)


30
31
32
33
34
35
36
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 30

required(
  :outputs,
  -> {
    OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseCodeInterpreterToolCall::Output]
  },
  nil?: true
)

#statusOpenAI::Models::Responses::ResponseCodeInterpreterToolCall::status

The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

Returns:

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


43
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 43

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

#type:code_interpreter_call

The type of the code interpreter tool call. Always code_interpreter_call.

Returns:

  • (:code_interpreter_call)


49
# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 49

required :type, const: :code_interpreter_call

Class Method Details

.variantsArray(OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::Output::Logs, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::Output::Image)



# File 'lib/openai/models/responses/response_code_interpreter_tool_call.rb', line 132

Instance Method Details

#to_hash{

Returns:

  • ({)


58
# File 'sig/openai/models/responses/response_code_interpreter_tool_call.rbs', line 58

def to_hash: -> {