mistral_rouille/models/model.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 * Build date: 2024-06-15T23:41:00.377209-06:00[America/Mexico_City]
7 * Generated using: https://openapi-generator.tech
8 * Open API specification v0.0.2 provided by Mistral @ https://docs.mistral.ai/redocusaurus/plugin-redoc-0.yaml
9 * Custom generation templates by [GovCraft Ai](https://www.govcraft.ai)
10 * Contact: roland@govcraft.ai
11 */
12
13use crate::models;
14use serde::{Deserialize, Serialize};
15
16/// Model : Model object.
17
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct Model {
20 #[serde(rename = "id")]
21 pub id: String,
22 #[serde(rename = "object")]
23 pub object: String,
24 #[serde(rename = "created")]
25 pub created: i32,
26 #[serde(rename = "owned_by")]
27 pub owned_by: String,
28}
29
30impl Model {
31 /// Creates a new `Model` instance.
32 ///
33 /// # Arguments
34 /// * `id`
35 /// * `object`
36 /// * `created`
37 /// * `owned_by`
38 ///
39 /// # Returns
40 ///
41 /// A new `Model` instance.
42 /// Model object.
43 pub fn new(id: String, object: String, created: i32, owned_by: String) -> Model {
44 Model {
45 id,
46 object,
47 created,
48 owned_by,
49 }
50 }
51}