Class: OpenAI::Models::Realtime::ConversationItemTruncatedEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/conversation_item_truncated_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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: , event_id: , item_id: , type: :"conversation.item.truncated") ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::ConversationItemTruncatedEvent for more details.

Returned when an earlier assistant audio message item is truncated by the client with a ‘conversation.item.truncate` event. This event is used to synchronize the server’s understanding of the audio with the client’s playback.

This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn’t been heard by the user.

Parameters:

  • audio_end_ms (Integer) (defaults to: )

    The duration up to which the audio was truncated, in milliseconds.

  • content_index (Integer) (defaults to: )

    The index of the content part that was truncated.

  • event_id (String) (defaults to: )

    The unique ID of the server event.

  • item_id (String) (defaults to: )

    The ID of the assistant message item that was truncated.

  • type (Symbol, :"conversation.item.truncated") (defaults to: :"conversation.item.truncated")

    The event type, must be ‘conversation.item.truncated`.



# File 'lib/openai/models/realtime/conversation_item_truncated_event.rb', line 37

Instance Attribute Details

#audio_end_msInteger

The duration up to which the audio was truncated, in milliseconds.

Returns:

  • (Integer)


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

required :audio_end_ms, Integer

#content_indexInteger

The index of the content part that was truncated.

Returns:

  • (Integer)


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

required :content_index, Integer

#event_idString

The unique ID of the server event.

Returns:

  • (String)


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

required :event_id, String

#item_idString

The ID of the assistant message item that was truncated.

Returns:

  • (String)


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

required :item_id, String

#typeSymbol, :"conversation.item.truncated"

The event type, must be ‘conversation.item.truncated`.

Returns:

  • (Symbol, :"conversation.item.truncated")


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

required :type, const: :"conversation.item.truncated"