Class: OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent

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

Defined Under Namespace

Classes: Agent

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

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(command:, command_index:, output_index:, sequence_number:, agent: nil, type: :"response.shell_call_command.added") ⇒ BetaResponseShellCallCommandAddedEvent

Returns a new instance of BetaResponseShellCallCommandAddedEvent.

Parameters:

  • command —

    The shell command that was added.

  • command_index —

    The index of the shell command that was added.

  • output_index —

    The index of the output item that was updated.

  • sequence_number —

    The sequence number of the event that was emitted.

  • agent (defaults to: nil) —

    The agent that owns this multi-agent streaming event.

  • type (defaults to: :"response.shell_call_command.added") —

    The type of the event, always response.shell_call_command.added.

  • command: (String)
  • command_index: (Integer)
  • output_index: (Integer)
  • sequence_number: (Integer)
  • agent: (OpenAI::Beta::BetaResponseShellCallCommandAddedEvent::Agent) (defaults to: nil)
  • type: (:"response.shell_call_command.added") (defaults to: :"response.shell_call_command.added")


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

Instance Attribute Details

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

The agent that owns this multi-agent streaming event.

Returns:

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


41
# File 'lib/openai/models/beta/beta_response_shell_call_command_added_event.rb', line 41

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

#command ⇒ String

The shell command that was added.

Returns:

  • (String)


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

required :command, String

#command_index ⇒ Integer

The index of the shell command that was added.

Returns:

  • (Integer)


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

required :command_index, Integer

#output_index ⇒ Integer

The index of the output item that was updated.

Returns:

  • (Integer)


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

required :output_index, Integer

#sequence_number ⇒ Integer

The sequence number of the event that was emitted.

Returns:

  • (Integer)


29
# File 'lib/openai/models/beta/beta_response_shell_call_command_added_event.rb', line 29

required :sequence_number, Integer

#type ⇒ :"response.shell_call_command.added"

The type of the event, always response.shell_call_command.added.

Returns:

  • (:"response.shell_call_command.added")


35
# File 'lib/openai/models/beta/beta_response_shell_call_command_added_event.rb', line 35

required :type, const: :"response.shell_call_command.added"

Instance Method Details

#to_hash ⇒ { command: String, command_index: Integer, output_index: Integer, sequence_number: Integer, ?type: :"response.shell_call_command.added", ?agent: OpenAI::Beta::BetaResponseShellCallCommandAddedEvent::Agent }

Returns:

  • ({ command: String, command_index: Integer, output_index: Integer, sequence_number: Integer, ?type: :"response.shell_call_command.added", ?agent: OpenAI::Beta::BetaResponseShellCallCommandAddedEvent::Agent })


61
62
63
64
65
66
67
68
# File 'sig/openai/models/beta/beta_response_shell_call_command_added_event.rbs', line 61

def to_hash: -> {
  command: String,
  command_index: Integer,
  output_index: Integer,
  sequence_number: Integer,
  ?type: :"response.shell_call_command.added",
  ?agent: OpenAI::Beta::BetaResponseShellCallCommandAddedEvent::Agent
}