openai_struct/models/create_message_request.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#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct CreateMessageRequest {
16 /// A list of files attached to the message, and the tools they should be added to.
17 #[serde(rename = "attachments")]
18 pub attachments: Option<Vec<crate::models::CreateMessageRequestAttachments>>,
19 #[serde(rename = "content")]
20 pub content: Value,
21 #[serde(rename = "metadata")]
22 pub metadata: Option<crate::models::Metadata>,
23 /// The role of the entity that is creating the message. Allowed values include: - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
24 #[serde(rename = "role")]
25 pub role: String,
26}