openai_struct/models/
realtime_conversation_item.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 RealtimeConversationItem : The item to add to the conversation.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct RealtimeConversationItem {
18    /// The arguments of the function call (for `function_call` items).
19    #[serde(rename = "arguments")]
20    pub arguments: Option<String>,
21    /// The ID of the function call (for `function_call` and  `function_call_output` items). If passed on a `function_call_output`  item, the server will check that a `function_call` item with the same  ID exists in the conversation history.
22    #[serde(rename = "call_id")]
23    pub call_id: Option<String>,
24    /// The content of the message, applicable for `message` items.  - Message items of role `system` support only `input_text` content - Message items of role `user` support `input_text` and `input_audio`    content - Message items of role `assistant` support `text` content.
25    #[serde(rename = "content")]
26    pub content: Option<Vec<crate::models::RealtimeConversationItemContent>>,
27    /// The unique ID of the item, this can be generated by the client to help  manage server-side context, but is not required because the server will  generate one if not provided.
28    #[serde(rename = "id")]
29    pub id: Option<String>,
30    /// The name of the function being called (for `function_call` items).
31    #[serde(rename = "name")]
32    pub name: Option<String>,
33    /// Identifier for the API object being returned - always `realtime.item`.
34    #[serde(rename = "object")]
35    pub object: Option<String>,
36    /// The output of the function call (for `function_call_output` items).
37    #[serde(rename = "output")]
38    pub output: Option<String>,
39    /// The role of the message sender (`user`, `assistant`, `system`), only  applicable for `message` items.
40    #[serde(rename = "role")]
41    pub role: Option<String>,
42    /// The status of the item (`completed`, `incomplete`). These have no effect  on the conversation, but are accepted for consistency with the  `conversation.item.created` event.
43    #[serde(rename = "status")]
44    pub status: Option<String>,
45    /// The type of the item (`message`, `function_call`, `function_call_output`).
46    #[serde(rename = "type")]
47    pub _type: Option<String>,
48}