thiggle-client 0.0.1

API for categorizing data with LLMs
Documentation
/*
 * Thiggle API
 *
 * API for categorizing data with LLMs
 *
 * The version of the OpenAPI document: 0.0.1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CategorizeRequest {
    /// The prompt that describes the classification task.
    #[serde(rename = "prompt")]
    pub prompt: String,
    /// The list of categories to be considered for the task
    #[serde(rename = "categories")]
    pub categories: Vec<String>,
    /// If true, the model may return an empty list of categories
    #[serde(rename = "allow_null_category", skip_serializing_if = "Option::is_none")]
    pub allow_null_category: Option<bool>,
    /// If true, the model may return multiple categories
    #[serde(rename = "allow_multiple_classes", skip_serializing_if = "Option::is_none")]
    pub allow_multiple_classes: Option<bool>,
}

impl CategorizeRequest {
    pub fn new(prompt: String, categories: Vec<String>) -> CategorizeRequest {
        CategorizeRequest {
            prompt,
            categories,
            allow_null_category: None,
            allow_multiple_classes: None,
        }
    }
}