openai_struct/models/realtime_server_event_conversation_item_truncated.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub RealtimeServerEventConversationItemTruncated : 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.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct RealtimeServerEventConversationItemTruncated {
18 /// The duration up to which the audio was truncated, in milliseconds.
19 #[serde(rename = "audio_end_ms")]
20 pub audio_end_ms: i32,
21 /// The index of the content part that was truncated.
22 #[serde(rename = "content_index")]
23 pub content_index: i32,
24 /// The unique ID of the server event.
25 #[serde(rename = "event_id")]
26 pub event_id: String,
27 /// The ID of the assistant message item that was truncated.
28 #[serde(rename = "item_id")]
29 pub item_id: String,
30 /// The event type, must be `conversation.item.truncated`.
31 #[serde(rename = "type")]
32 pub _type: String,
33}