openai_struct/models/
chat_completion_request_assistant_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 ChatCompletionRequestAssistantMessage : Messages sent by the model in response to user messages.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct ChatCompletionRequestAssistantMessage {
18    #[serde(rename = "audio")]
19    pub audio: Option<crate::models::ChatCompletionRequestAssistantMessageAudio>,
20    /// The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
21    #[serde(rename = "content")]
22    pub content: Option<Value>,
23    #[serde(rename = "function_call")]
24    pub function_call: Option<crate::models::ChatCompletionRequestAssistantMessageFunctionCall>,
25    /// An optional name for the participant. Provides the model information to differentiate between participants of the same role.
26    #[serde(rename = "name")]
27    pub name: Option<String>,
28    /// The refusal message by the assistant.
29    #[serde(rename = "refusal")]
30    pub refusal: Option<String>,
31    /// The role of the messages author, in this case `assistant`.
32    #[serde(rename = "role")]
33    pub role: String,
34    #[serde(rename = "tool_calls")]
35    pub tool_calls: Option<crate::models::ChatCompletionMessageToolCalls>,
36}