Class: OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part

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

Overview

See Also:

  • OpenAI::Models::Realtime::ResponseContentPartDoneEvent#part

Defined Under Namespace

Modules: Type

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(audio: nil, text: nil, transcript: nil, type: nil) ⇒ Part

Returns a new instance of Part.

Parameters:

  • audio (defaults to: nil) —

    Base64-encoded audio data (if type is "audio").

  • text (defaults to: nil) —

    The text content (if type is "text").

  • transcript (defaults to: nil) —

    The transcript of the audio (if type is "audio").

  • type (defaults to: nil) —

    The content type ("text", "audio").

  • audio: (String) (defaults to: nil)
  • text: (String) (defaults to: nil)
  • transcript: (String) (defaults to: nil)
  • type: (OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_) (defaults to: nil)


# File 'lib/openai/models/realtime/response_content_part_done_event.rb', line 100

Instance Attribute Details

#audio ⇒ String?

Base64-encoded audio data (if type is "audio").

Returns:

  • (String, nil)


80
# File 'lib/openai/models/realtime/response_content_part_done_event.rb', line 80

optional :audio, String

#text ⇒ String?

The text content (if type is "text").

Returns:

  • (String, nil)


86
# File 'lib/openai/models/realtime/response_content_part_done_event.rb', line 86

optional :text, String

#transcript ⇒ String?

The transcript of the audio (if type is "audio").

Returns:

  • (String, nil)


92
# File 'lib/openai/models/realtime/response_content_part_done_event.rb', line 92

optional :transcript, String

#type ⇒ OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_?

The content type ("text", "audio").

Returns:

  • (OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_, nil)


98
# File 'lib/openai/models/realtime/response_content_part_done_event.rb', line 98

optional :type, enum: -> { OpenAI::Realtime::ResponseContentPartDoneEvent::Part::Type }

Instance Method Details

#to_hash ⇒ { ?audio: String, ?text: String, ?transcript: String, ?type: OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_ }

Returns:

  • ({ ?audio: String, ?text: String, ?transcript: String, ?type: OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_ })


121
122
123
124
125
126
# File 'sig/openai/models/realtime/response_content_part_done_event.rbs', line 121

def to_hash: -> {
  ?audio: String,
  ?text: String,
  ?transcript: String,
  ?type: OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::type_
}