Class: OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent

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

Defined Under Namespace

Classes: Agent, 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) ⇒ BetaResponseShellCallOutputContentDoneEvent

Returns a new instance of BetaResponseShellCallOutputContentDoneEvent.

Parameters:

  • command_index —

    The index of the shell command that produced output.

  • item_id —

    The ID of the output item that was updated.

  • output —

    The output contents emitted for the shell command.

  • output_index —

    The index of the output item that was updated.

  • sequence_number —

    The sequence number of the event that was emitted.

  • agent —

    The agent that owns this multi-agent streaming event.

  • type (defaults to: :exit) —

    The type of the event, always response.shell_call_output_content.done.

  • command_index: (Integer)
  • item_id: (String)
  • output: (::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output])
  • output_index: (Integer)
  • sequence_number: (Integer)
  • agent: (OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent)
  • type: (:"response.shell_call_output_content.done") (defaults to: :exit)


# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 165

Instance Attribute Details

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

The agent that owns this multi-agent streaming event.

Returns:

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


50
# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 50

optional :agent, -> { OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent }

#command_index ⇒ Integer

The index of the shell command that produced output.

Returns:

  • (Integer)


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

required :command_index, Integer

#item_id ⇒ String

The ID of the output item that was updated.

Returns:

  • (String)


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

required :item_id, String

#output ⇒ ::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output]

The output contents emitted for the shell command.

Returns:

  • (::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output])


23
24
25
26
# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 23

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

#output_index ⇒ Integer

The index of the output item that was updated.

Returns:

  • (Integer)


32
# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 32

required :output_index, Integer

#sequence_number ⇒ Integer

The sequence number of the event that was emitted.

Returns:

  • (Integer)


38
# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 38

required :sequence_number, Integer

#type ⇒ :"response.shell_call_output_content.done"

The type of the event, always response.shell_call_output_content.done.

Returns:

  • (:"response.shell_call_output_content.done")


44
# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 44

required :type, const: :"response.shell_call_output_content.done"

Class Method Details

.variants ⇒ Array(OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Exit)



# File 'lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb', line 175

Instance Method Details

#to_hash ⇒ { command_index: Integer, item_id: String, output: ::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output], output_index: Integer, sequence_number: Integer, ?type: :"response.shell_call_output_content.done", ?agent: OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent }

Returns:

  • ({ command_index: Integer, item_id: String, output: ::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output], output_index: Integer, sequence_number: Integer, ?type: :"response.shell_call_output_content.done", ?agent: OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent })


68
69
70
71
72
73
74
75
76
# File 'sig/openai/models/beta/beta_response_shell_call_output_content_done_event.rbs', line 68

def to_hash: -> {
  command_index: Integer,
  item_id: String,
  output: ::Array[OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Output],
  output_index: Integer,
  sequence_number: Integer,
  ?type: :"response.shell_call_output_content.done",
  ?agent: OpenAI::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent
}