Skip to main content

mistral_openapi_client/models/
thinking_inner.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ThinkingInner {
16    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
17    pub r#type: Option<Type>,
18    #[serde(rename = "text")]
19    pub text: String,
20    #[serde(rename = "tool")]
21    pub tool: Box<models::Tool1>,
22    #[serde(rename = "title")]
23    pub title: String,
24    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
25    pub url: Option<String>,
26    #[serde(rename = "favicon", skip_serializing_if = "Option::is_none")]
27    pub favicon: Option<String>,
28    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
29    pub description: Option<String>,
30    #[serde(rename = "reference_ids")]
31    pub reference_ids: Vec<i32>,
32}
33
34impl ThinkingInner {
35    pub fn new(text: String, tool: models::Tool1, title: String, reference_ids: Vec<i32>) -> ThinkingInner {
36        ThinkingInner {
37            r#type: None,
38            text,
39            tool: Box::new(tool),
40            title,
41            url: None,
42            favicon: None,
43            description: None,
44            reference_ids,
45        }
46    }
47}
48/// 
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Type {
51    #[serde(rename = "text")]
52    Text,
53    #[serde(rename = "tool_reference")]
54    ToolReference,
55    #[serde(rename = "reference")]
56    Reference,
57}
58
59impl Default for Type {
60    fn default() -> Type {
61        Self::Text
62    }
63}
64