Class: OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionDeltaEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb,
sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_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(event_id:, item_id:, content_index: nil, delta: nil, logprobs: nil, type: :"conversation.item.input_audio_transcription.delta") ⇒ ConversationItemInputAudioTranscriptionDeltaEvent

Returns a new instance of ConversationItemInputAudioTranscriptionDeltaEvent.

Parameters:

  • event_id —

    The unique ID of the server event.

  • item_id —

    The ID of the item containing the audio that is being transcribed.

  • content_index (defaults to: nil) —

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

  • delta (defaults to: nil) —

    The text delta.

  • logprobs (defaults to: nil) —

    The log probabilities of the transcription. These can be enabled by configuring the session with "include": ["item.input_audio_transcription.logprobs"]. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.

  • type (defaults to: :"conversation.item.input_audio_transcription.delta") —

    The event type, must be conversation.item.input_audio_transcription.delta.

  • event_id: (String)
  • item_id: (String)
  • content_index: (Integer) (defaults to: nil)
  • delta: (String) (defaults to: nil)
  • logprobs: (::Array[OpenAI::Realtime::LogProbProperties], nil) (defaults to: nil)
  • type: (:"conversation.item.input_audio_transcription.delta") (defaults to: :"conversation.item.input_audio_transcription.delta")


# File 'lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb', line 51

Instance Attribute Details

#content_index ⇒ Integer?

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

Returns:

  • (Integer, nil)


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

optional :content_index, Integer

#delta ⇒ String?

The text delta.

Returns:

  • (String, nil)


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

optional :delta, String

#event_id ⇒ String

The unique ID of the server event.

Returns:

  • (String)


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

required :event_id, String

#item_id ⇒ String

The ID of the item containing the audio that is being transcribed.

Returns:

  • (String)


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

required :item_id, String

#logprobs ⇒ ::Array[OpenAI::Realtime::LogProbProperties]?

The log probabilities of the transcription. These can be enabled by configuring the session with "include": ["item.input_audio_transcription.logprobs"]. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.

Returns:

  • (::Array[OpenAI::Realtime::LogProbProperties], nil)


45
46
47
48
49
# File 'lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb', line 45

optional(
  :logprobs,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Realtime::LogProbProperties] },
  nil?: true
)

#type ⇒ :"conversation.item.input_audio_transcription.delta"

The event type, must be conversation.item.input_audio_transcription.delta.

Returns:

  • (:"conversation.item.input_audio_transcription.delta")


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

required :type, const: :"conversation.item.input_audio_transcription.delta"

Instance Method Details

#to_hash ⇒ { event_id: String, item_id: String, ?type: :"conversation.item.input_audio_transcription.delta", ?content_index: Integer, ?delta: String, ?logprobs: ::Array[OpenAI::Realtime::LogProbProperties]? }

Returns:

  • ({ event_id: String, item_id: String, ?type: :"conversation.item.input_audio_transcription.delta", ?content_index: Integer, ?delta: String, ?logprobs: ::Array[OpenAI::Realtime::LogProbProperties]? })


68
69
70
71
72
73
74
75
# File 'sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs', line 68

def to_hash: -> {
  event_id: String,
  item_id: String,
  ?type: :"conversation.item.input_audio_transcription.delta",
  ?content_index: Integer,
  ?delta: String,
  ?logprobs: ::Array[OpenAI::Realtime::LogProbProperties]?
}