Skip to main content

mistral_openapi_client/models/
conversation_source.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 ConversationSource {
17    #[serde(rename = "EXPLORER")]
18    Explorer,
19    #[serde(rename = "UPLOADED_FILE")]
20    UploadedFile,
21    #[serde(rename = "DIRECT_INPUT")]
22    DirectInput,
23    #[serde(rename = "PLAYGROUND")]
24    Playground,
25
26}
27
28impl std::fmt::Display for ConversationSource {
29    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Self::Explorer => write!(f, "EXPLORER"),
32            Self::UploadedFile => write!(f, "UPLOADED_FILE"),
33            Self::DirectInput => write!(f, "DIRECT_INPUT"),
34            Self::Playground => write!(f, "PLAYGROUND"),
35        }
36    }
37}
38
39impl Default for ConversationSource {
40    fn default() -> ConversationSource {
41        Self::Explorer
42    }
43}
44