mistralai_client/v1/
model_list.rs

1use serde::{Deserialize, Serialize};
2
3// -----------------------------------------------------------------------------
4// Response
5
6#[derive(Clone, Debug, Deserialize, Serialize)]
7pub struct ModelListResponse {
8    pub object: String,
9    pub data: Vec<ModelListData>,
10}
11
12/// See: https://docs.mistral.ai/api/#tag/models
13#[derive(Clone, Debug, Deserialize, Serialize)]
14pub struct ModelListData {
15    pub id: String,
16    pub object: String,
17    /// Unix timestamp (in seconds).
18    pub created: u32,
19    pub owned_by: String,
20    pub root: Option<String>,
21    pub archived: bool,
22    pub name: String,
23    pub description: String,
24    pub capabilities: ModelListDataCapabilies,
25    pub max_context_length: u32,
26    pub aliases: Vec<String>,
27    /// ISO 8601 date (`YYYY-MM-DDTHH:MM:SSZ`).
28    pub deprecation: Option<String>,
29}
30
31#[derive(Clone, Debug, Deserialize, Serialize)]
32pub struct ModelListDataCapabilies {
33    pub completion_chat: bool,
34    pub completion_fim: bool,
35    pub function_calling: bool,
36    pub fine_tuning: bool,
37}