Class ConversationItemTruncatedEvent
-
- All Implemented Interfaces:
public final class ConversationItemTruncatedEvent
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ConversationItemTruncatedEvent.Builder
A builder for ConversationItemTruncatedEvent.
-
Method Summary
Modifier and Type Method Description final Long
audioEndMs()
The duration up to which the audio was truncated, in milliseconds. final Long
contentIndex()
The index of the content part that was truncated. final String
eventId()
The unique ID of the server event. final String
itemId()
The ID of the assistant message item that was truncated. final JsonValue
_type()
The event type, must be conversation.item.truncated
.final JsonField<Long>
_audioEndMs()
Returns the raw JSON value of audioEndMs. final JsonField<Long>
_contentIndex()
Returns the raw JSON value of contentIndex. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<String>
_itemId()
Returns the raw JSON value of itemId. final Map<String, JsonValue>
_additionalProperties()
final ConversationItemTruncatedEvent.Builder
toBuilder()
final ConversationItemTruncatedEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ConversationItemTruncatedEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ConversationItemTruncatedEvent. -
-
Method Detail
-
audioEndMs
final Long audioEndMs()
The duration up to which the audio was truncated, in milliseconds.
-
contentIndex
final Long contentIndex()
The index of the content part that was truncated.
-
_type
final JsonValue _type()
The event type, must be
conversation.item.truncated
.Expected to always return the following:
JsonValue.from("conversation.item.truncated")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_audioEndMs
final JsonField<Long> _audioEndMs()
Returns the raw JSON value of audioEndMs.
Unlike audioEndMs, this method doesn't throw if the JSON field has an unexpected type.
-
_contentIndex
final JsonField<Long> _contentIndex()
Returns the raw JSON value of contentIndex.
Unlike contentIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_itemId
final JsonField<String> _itemId()
Returns the raw JSON value of itemId.
Unlike itemId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ConversationItemTruncatedEvent.Builder toBuilder()
-
validate
final ConversationItemTruncatedEvent validate()
-
builder
final static ConversationItemTruncatedEvent.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemTruncatedEvent.
The following fields are required:
.audioEndMs() .contentIndex() .eventId() .itemId()
-
-
-
-