Skip to main content

mistral_openapi_client/models/
batch_job_in.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct BatchJobIn {
16    #[serde(rename = "input_files", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub input_files: Option<Option<Vec<uuid::Uuid>>>,
18    #[serde(rename = "requests", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub requests: Option<Option<Vec<models::BatchRequest>>>,
20    /// The endpoint to be used for batch inference.
21    #[serde(rename = "endpoint")]
22    pub endpoint: models::ApiEndpoint,
23    #[serde(rename = "model", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub model: Option<Option<String>>,
25    #[serde(rename = "agent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub agent_id: Option<Option<String>>,
27    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub metadata: Option<Option<std::collections::HashMap<String, String>>>,
29    /// The timeout in hours for the batch inference job.
30    #[serde(rename = "timeout_hours", skip_serializing_if = "Option::is_none")]
31    pub timeout_hours: Option<i32>,
32}
33
34impl BatchJobIn {
35    pub fn new(endpoint: models::ApiEndpoint) -> BatchJobIn {
36        BatchJobIn {
37            input_files: None,
38            requests: None,
39            endpoint,
40            model: None,
41            agent_id: None,
42            metadata: None,
43            timeout_hours: None,
44        }
45    }
46}
47