Class: OpenAI::Models::Realtime::ConversationItemTruncateEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Realtime::ConversationItemTruncateEvent
- Defined in:
- lib/openai/models/realtime/conversation_item_truncate_event.rb
Instance Attribute Summary collapse
-
#audio_end_ms ⇒ Integer
Inclusive duration up to which audio is truncated, in milliseconds.
-
#content_index ⇒ Integer
The index of the content part to truncate.
-
#event_id ⇒ String?
Optional client-generated ID used to identify this event.
-
#item_id ⇒ String
The ID of the assistant message item to truncate.
-
#type ⇒ Symbol, :"conversation.item.truncate"
The event type, must be ‘conversation.item.truncate`.
Instance Method Summary collapse
-
#initialize(audio_end_ms:, content_index:, item_id:, event_id: nil, type: :"conversation.item.truncate") ⇒ Object
constructor
Some parameter documentations has been truncated, see ConversationItemTruncateEvent for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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_end_ms:, content_index:, item_id:, event_id: nil, type: :"conversation.item.truncate") ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Realtime::ConversationItemTruncateEvent for more details.
Send this event to truncate a previous assistant message’s audio. The server will produce audio faster than realtime, so this event is useful when the user interrupts to truncate audio that has already been sent to the client but not yet played. This will synchronize the server’s understanding of the audio with the client’s playback.
Truncating audio will delete the server-side text transcript to ensure there is not text in the context that hasn’t been heard by the user.
If successful, the server will respond with a ‘conversation.item.truncated` event.
|
|
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 40
|
Instance Attribute Details
#audio_end_ms ⇒ Integer
Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error.
13 |
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 13 required :audio_end_ms, Integer |
#content_index ⇒ Integer
The index of the content part to truncate. Set this to ‘0`.
19 |
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 19 required :content_index, Integer |
#event_id ⇒ String?
Optional client-generated ID used to identify this event.
38 |
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 38 optional :event_id, String |
#item_id ⇒ String
The ID of the assistant message item to truncate. Only assistant message items can be truncated.
26 |
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 26 required :item_id, String |
#type ⇒ Symbol, :"conversation.item.truncate"
The event type, must be ‘conversation.item.truncate`.
32 |
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 32 required :type, const: :"conversation.item.truncate" |