Class: OpenAI::Models::Realtime::ResponseTextDoneEvent

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

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(content_index:, event_id:, item_id:, output_index:, response_id:, text:, type: :"response.output_text.done") ⇒ ResponseTextDoneEvent

Returns a new instance of ResponseTextDoneEvent.

Parameters:

  • content_index —

    The index of the content part in the item's content array.

  • event_id —

    The unique ID of the server event.

  • item_id —

    The ID of the item.

  • output_index —

    The index of the output item in the response.

  • response_id —

    The ID of the response.

  • text —

    The final text content.

  • type (defaults to: :"response.output_text.done") —

    The event type, must be response.output_text.done.

  • content_index: (Integer)
  • event_id: (String)
  • item_id: (String)
  • output_index: (Integer)
  • response_id: (String)
  • text: (String)
  • type: (:"response.output_text.done") (defaults to: :"response.output_text.done")


# File 'lib/openai/models/realtime/response_text_done_event.rb', line 49

Instance Attribute Details

#content_index ⇒ Integer

The index of the content part in the item's content array.

Returns:

  • (Integer)


11
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 11

required :content_index, Integer

#event_id ⇒ String

The unique ID of the server event.

Returns:

  • (String)


17
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 17

required :event_id, String

#item_id ⇒ String

The ID of the item.

Returns:

  • (String)


23
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 23

required :item_id, String

#output_index ⇒ Integer

The index of the output item in the response.

Returns:

  • (Integer)


29
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 29

required :output_index, Integer

#response_id ⇒ String

The ID of the response.

Returns:

  • (String)


35
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 35

required :response_id, String

#text ⇒ String

The final text content.

Returns:

  • (String)


41
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 41

required :text, String

#type ⇒ :"response.output_text.done"

The event type, must be response.output_text.done.

Returns:

  • (:"response.output_text.done")


47
# File 'lib/openai/models/realtime/response_text_done_event.rb', line 47

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

Instance Method Details

#to_hash ⇒ { content_index: Integer, event_id: String, item_id: String, output_index: Integer, response_id: String, text: String, ?type: :"response.output_text.done" }

Returns:

  • ({ content_index: Integer, event_id: String, item_id: String, output_index: Integer, response_id: String, text: String, ?type: :"response.output_text.done" })


61
62
63
64
65
66
67
68
69
# File 'sig/openai/models/realtime/response_text_done_event.rbs', line 61

def to_hash: -> {
  content_index: Integer,
  event_id: String,
  item_id: String,
  output_index: Integer,
  response_id: String,
  text: String,
  ?type: :"response.output_text.done"
}