Skip to main content

mistral_openapi_client/models/
tool_execution_entry.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 ToolExecutionEntry {
16    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
17    pub object: Option<Object>,
18    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
19    pub r#type: Option<Type>,
20    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
21    pub created_at: Option<String>,
22    #[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub completed_at: Option<Option<String>>,
24    #[serde(rename = "agent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub agent_id: Option<Option<String>>,
26    #[serde(rename = "model", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub model: Option<Option<String>>,
28    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
29    pub id: Option<String>,
30    #[serde(rename = "name")]
31    pub name: Box<models::Name>,
32    #[serde(rename = "arguments")]
33    pub arguments: String,
34    #[serde(rename = "info", skip_serializing_if = "Option::is_none")]
35    pub info: Option<std::collections::HashMap<String, serde_json::Value>>,
36}
37
38impl ToolExecutionEntry {
39    pub fn new(name: models::Name, arguments: String) -> ToolExecutionEntry {
40        ToolExecutionEntry {
41            object: None,
42            r#type: None,
43            created_at: None,
44            completed_at: None,
45            agent_id: None,
46            model: None,
47            id: None,
48            name: Box::new(name),
49            arguments,
50            info: None,
51        }
52    }
53}
54/// 
55#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
56pub enum Object {
57    #[serde(rename = "entry")]
58    Entry,
59}
60
61impl Default for Object {
62    fn default() -> Object {
63        Self::Entry
64    }
65}
66/// 
67#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
68pub enum Type {
69    #[serde(rename = "tool.execution")]
70    ToolExecution,
71}
72
73impl Default for Type {
74    fn default() -> Type {
75        Self::ToolExecution
76    }
77}
78