Skip to main content

mistral_openapi_client/models/
api_endpoint.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/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum ApiEndpoint {
17    #[serde(rename = "/v1/chat/completions")]
18    SlashV1SlashChatSlashCompletions,
19    #[serde(rename = "/v1/embeddings")]
20    SlashV1SlashEmbeddings,
21    #[serde(rename = "/v1/fim/completions")]
22    SlashV1SlashFimSlashCompletions,
23    #[serde(rename = "/v1/moderations")]
24    SlashV1SlashModerations,
25    #[serde(rename = "/v1/chat/moderations")]
26    SlashV1SlashChatSlashModerations,
27    #[serde(rename = "/v1/ocr")]
28    SlashV1SlashOcr,
29    #[serde(rename = "/v1/classifications")]
30    SlashV1SlashClassifications,
31    #[serde(rename = "/v1/chat/classifications")]
32    SlashV1SlashChatSlashClassifications,
33    #[serde(rename = "/v1/conversations")]
34    SlashV1SlashConversations,
35    #[serde(rename = "/v1/audio/transcriptions")]
36    SlashV1SlashAudioSlashTranscriptions,
37
38}
39
40impl std::fmt::Display for ApiEndpoint {
41    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
42        match self {
43            Self::SlashV1SlashChatSlashCompletions => write!(f, "/v1/chat/completions"),
44            Self::SlashV1SlashEmbeddings => write!(f, "/v1/embeddings"),
45            Self::SlashV1SlashFimSlashCompletions => write!(f, "/v1/fim/completions"),
46            Self::SlashV1SlashModerations => write!(f, "/v1/moderations"),
47            Self::SlashV1SlashChatSlashModerations => write!(f, "/v1/chat/moderations"),
48            Self::SlashV1SlashOcr => write!(f, "/v1/ocr"),
49            Self::SlashV1SlashClassifications => write!(f, "/v1/classifications"),
50            Self::SlashV1SlashChatSlashClassifications => write!(f, "/v1/chat/classifications"),
51            Self::SlashV1SlashConversations => write!(f, "/v1/conversations"),
52            Self::SlashV1SlashAudioSlashTranscriptions => write!(f, "/v1/audio/transcriptions"),
53        }
54    }
55}
56
57impl Default for ApiEndpoint {
58    fn default() -> ApiEndpoint {
59        Self::SlashV1SlashChatSlashCompletions
60    }
61}
62