/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// MemoryMessage : A single message in conversation history
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MemoryMessage {
    #[serde(rename = "role")]
    pub role: Role,
    #[serde(rename = "content")]
    pub content: String,
}

impl MemoryMessage {
    /// A single message in conversation history
    pub fn new(role: Role, content: String) -> MemoryMessage {
        MemoryMessage {
            role,
            content,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Role {
    #[serde(rename = "user")]
    User,
    #[serde(rename = "assistant")]
    Assistant,
    #[serde(rename = "system")]
    System,
}

impl Default for Role {
    fn default() -> Role {
        Self::User
    }
}

