diff --git a/src/v1/model_list.rs b/src/v1/model_list.rs index 1ff44bf..cd69493 100644 --- a/src/v1/model_list.rs +++ b/src/v1/model_list.rs @@ -9,6 +9,7 @@ pub struct ModelListResponse { pub data: Vec, } +/// See: https://docs.mistral.ai/api/#tag/models #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ModelListData { pub id: String, @@ -16,27 +17,21 @@ pub struct ModelListData { /// Unix timestamp (in seconds). pub created: u32, pub owned_by: String, - pub permission: Vec, - // TODO Check this prop (seen in API responses but undocumented). - // pub root: ???, - // TODO Check this prop (seen in API responses but undocumented). - // pub parent: ???, + pub root: Option, + pub archived: bool, + pub name: String, + pub description: String, + pub capabilities: ModelListDataCapabilies, + pub max_context_length: u32, + pub aliases: Vec, + /// ISO 8601 date (`YYYY-MM-DDTHH:MM:SSZ`). + pub deprecation: Option, } #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct ModelListDataPermission { - pub id: String, - pub object: String, - /// Unix timestamp (in seconds). - pub created: u32, - pub allow_create_engine: bool, - pub allow_sampling: bool, - pub allow_logprobs: bool, - pub allow_search_indices: bool, - pub allow_view: bool, - pub allow_fine_tuning: bool, - pub organization: String, - pub is_blocking: bool, - // TODO Check this prop (seen in API responses but undocumented). - // pub group: ???, +pub struct ModelListDataCapabilies { + pub completion_chat: bool, + pub completion_fim: bool, + pub function_calling: bool, + pub fine_tuning: bool, }