openai-struct 0.0.4

利用openai的openapi生成的rust结构体
Documentation
/*
 * OpenAI API
 *
 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
 *
 * OpenAPI spec pub version: 2.3.0
 *
 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
 */

#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct CreateMessageRequest {
    /// A list of files attached to the message, and the tools they should be added to.
    #[serde(rename = "attachments")]
    pub attachments: Option<Vec<crate::models::CreateMessageRequestAttachments>>,
    #[serde(rename = "content")]
    pub content: Value,
    #[serde(rename = "metadata")]
    pub metadata: Option<crate::models::Metadata>,
    /// 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.
    #[serde(rename = "role")]
    pub role: String,
}