Class: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::Audio

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

Overview

See Also:

  • OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta#audio

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

Returns a new instance of Audio.

Parameters:

  • id —

    Unique identifier for this audio response.

  • data —

    Base64 encoded audio bytes generated by the model, in the format specified in the request.

  • expires_at —

    The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.

  • transcript —

    Transcript text from this audio chunk.

  • id: (String)
  • data: (String)
  • expires_at: (Integer)
  • transcript: (String)


364
365
366
367
368
369
# File 'sig/openai/models/chat/chat_completion_chunk.rbs', line 364

def initialize: (
  ?id: String,
  ?data: String,
  ?expires_at: Integer,
  ?transcript: String
) -> void

Instance Attribute Details

#data ⇒ String?

Base64 encoded audio bytes generated by the model, in the format specified in the request.

Returns:

  • (String, nil)


314
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 314

optional :data, String

#expires_at ⇒ Integer?

The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.

Returns:

  • (Integer, nil)


321
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 321

optional :expires_at, Integer

#id ⇒ String?

Unique identifier for this audio response.

Returns:

  • (String, nil)


307
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 307

optional :id, String

#transcript ⇒ String?

Transcript text from this audio chunk.

Returns:

  • (String, nil)


327
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 327

optional :transcript, String

Instance Method Details

#to_hash ⇒ { ?id: String, ?data: String, ?expires_at: Integer, ?transcript: String }

Returns:

  • ({ ?id: String, ?data: String, ?expires_at: Integer, ?transcript: String })


371
372
373
374
375
376
# File 'sig/openai/models/chat/chat_completion_chunk.rbs', line 371

def to_hash: -> {
  ?id: String,
  ?data: String,
  ?expires_at: Integer,
  ?transcript: String
}