openai_struct/models/realtime_server_event_conversation_item_created.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 RealtimeServerEventConversationItemCreated : Returned when a conversation item is created. There are several scenarios that produce this event: - The server is generating a Response, which if successful will produce either one or two Items, which will be of type `message` (role `assistant`) or type `function_call`. - The input audio buffer has been committed, either by the client or the server (in `server_vad` mode). The server will take the content of the input audio buffer and add it to a new user message Item. - The client has sent a `conversation.item.create` event to add a new Item to the Conversation.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct RealtimeServerEventConversationItemCreated {
18 /// The unique ID of the server event.
19 #[serde(rename = "event_id")]
20 pub event_id: String,
21 #[serde(rename = "item")]
22 pub item: crate::models::RealtimeConversationItem,
23 /// The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation.
24 #[serde(rename = "previous_item_id")]
25 pub previous_item_id: String,
26 /// The event type, must be `conversation.item.created`.
27 #[serde(rename = "type")]
28 pub _type: String,
29}