openai_struct/models/
easy_input_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 EasyInputMessage : A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct EasyInputMessage {
18    /// Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
19    #[serde(rename = "content")]
20    pub content: Value,
21    /// The role of the message input. One of `user`, `assistant`, `system`, or `developer`.
22    #[serde(rename = "role")]
23    pub role: String,
24    /// The type of the message input. Always `message`.
25    #[serde(rename = "type")]
26    pub _type: Option<String>,
27}