Class: OpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part

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

Overview

See Also:

  • OpenAI::Models::Realtime::ResponseContentPartAddedEvent#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_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(audio: nil, text: nil, transcript: nil, type: nil) ⇒ Object

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").



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

Instance Attribute Details

#audioString?

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

Returns:

  • (String, nil)


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

optional :audio, String

#textString?

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

Returns:

  • (String, nil)


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

optional :text, String

#transcriptString?

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

Returns:

  • (String, nil)


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

optional :transcript, String

#typeOpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part::type_?

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

Returns:

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


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

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

Instance Method Details

#to_hash{

Returns:

  • ({)


121
# File 'sig/openai/models/realtime/response_content_part_added_event.rbs', line 121

def to_hash: -> {