openai_struct/models/
chat_completion_response_message.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 ChatCompletionResponseMessage : A chat completion message generated by the model.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct ChatCompletionResponseMessage {
18    /// Annotations for the message, when applicable, as when using the [web search tool](/docs/guides/tools-web-search?api-mode=chat).
19    #[serde(rename = "annotations")]
20    pub annotations: Option<Vec<crate::models::ChatCompletionResponseMessageAnnotations>>,
21    #[serde(rename = "audio")]
22    pub audio: Option<crate::models::ChatCompletionResponseMessageAudio>,
23    /// The contents of the message.
24    #[serde(rename = "content")]
25    pub content: String,
26    #[serde(rename = "function_call")]
27    pub function_call: Option<crate::models::ChatCompletionResponseMessageFunctionCall>,
28    /// The refusal message generated by the model.
29    #[serde(rename = "refusal")]
30    pub refusal: Option<String>,
31    /// The role of the author of this message.
32    #[serde(rename = "role")]
33    pub role: Option<String>,
34    #[serde(rename = "tool_calls")]
35    pub tool_calls: Option<crate::models::ChatCompletionMessageToolCalls>,
36}