Class: OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall

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

Defined Under Namespace

Modules: Output, 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_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.

  • agent —

    The agent that produced this item.

  • type (defaults to: :image) —

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



# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 57

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseCodeInterpreterToolCall::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseCodeInterpreterToolCall::Agent, nil)


55
# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 55

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

#code ⇒ String?

The code to run, or null if not available.

Returns:

  • (String, nil)


17
# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 17

required :code, String, nil?: true

#container_id ⇒ String

The ID of the container used to run the code.

Returns:

  • (String)


23
# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 23

required :container_id, String

#id ⇒ String

The unique ID of the code interpreter tool call.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 11

required :id, String

#outputs ⇒ ::Array[OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::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::Beta::BetaResponseCodeInterpreterToolCall::output], nil)


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

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

#status ⇒ OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::status

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

Returns:

  • (OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::status)


43
# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 43

required :status, enum: -> { OpenAI::Beta::BetaResponseCodeInterpreterToolCall::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/beta/beta_response_code_interpreter_tool_call.rb', line 49

required :type, const: :code_interpreter_call

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 158

.variants ⇒ Array(OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Output::Logs, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Output::Image)



# File 'lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb', line 141

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


67
# File 'sig/openai/models/beta/beta_response_code_interpreter_tool_call.rbs', line 67

def to_hash: -> {