mistral_rouille/models/
chat_completion_response_function_call.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 * Build date: 2024-06-15T23:41:00.377209-06:00[America/Mexico_City]
7 * Generated using: https://openapi-generator.tech
8 * Open API specification v0.0.2 provided by Mistral @ https://docs.mistral.ai/redocusaurus/plugin-redoc-0.yaml
9 * Custom generation templates by [GovCraft Ai](https://www.govcraft.ai)
10 * Contact: roland@govcraft.ai
11 */
12
13use crate::models;
14use serde::{Deserialize, Serialize};
15
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct ChatCompletionResponseFunctionCall {
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<String>,
20    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
21    pub object: Option<String>,
22    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
23    pub created: Option<i32>,
24    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
25    pub model: Option<String>,
26    #[serde(rename = "choices", skip_serializing_if = "Option::is_none")]
27    pub choices: Option<Vec<models::Choices>>,
28    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
29    pub usage: Option<models::Usage>,
30}
31
32impl ChatCompletionResponseFunctionCall {
33    /// Creates a new `ChatCompletionResponseFunctionCall` instance.
34    ///
35    /// # Arguments
36    ///
37    /// # Returns
38    ///
39    /// A new `ChatCompletionResponseFunctionCall` instance.
40    pub fn new() -> ChatCompletionResponseFunctionCall {
41        ChatCompletionResponseFunctionCall {
42            id: None,
43            object: None,
44            created: None,
45            model: None,
46            choices: None,
47            usage: None,
48        }
49    }
50}