mistral_rouille/models/chat_completion_request_function_call_tools_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 * 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 ChatCompletionRequestFunctionCallToolsInner {
18 /// The type of the tool. Currently, only `function` is supported.
19 #[serde(rename = "type")]
20 pub r#type: String,
21 #[serde(rename = "function")]
22 pub function: models::ToolsFn,
23}
24
25impl ChatCompletionRequestFunctionCallToolsInner {
26 /// Creates a new `ChatCompletionRequestFunctionCallToolsInner` instance.
27 ///
28 /// # Arguments
29 /// * `r#type`
30 /// * `function`
31 ///
32 /// # Returns
33 ///
34 /// A new `ChatCompletionRequestFunctionCallToolsInner` instance.
35 pub fn new(
36 r#type: String,
37 function: models::ToolsFn,
38 ) -> ChatCompletionRequestFunctionCallToolsInner {
39 ChatCompletionRequestFunctionCallToolsInner { r#type, function }
40 }
41}