vapi_client/models/
client_message_tool_calls.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ClientMessageToolCalls {
17    /// This is the type of the message. \"tool-calls\" is sent to call a tool.
18    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
19    pub r#type: Option<Type>,
20    /// This is the list of tools calls that the model is requesting along with the original tool configuration.
21    #[serde(rename = "toolWithToolCallList")]
22    pub tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>,
23    /// This is the list of tool calls that the model is requesting.
24    #[serde(rename = "toolCallList")]
25    pub tool_call_list: Vec<models::ToolCall>,
26}
27
28impl ClientMessageToolCalls {
29    pub fn new(
30        tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>,
31        tool_call_list: Vec<models::ToolCall>,
32    ) -> ClientMessageToolCalls {
33        ClientMessageToolCalls {
34            r#type: None,
35            tool_with_tool_call_list,
36            tool_call_list,
37        }
38    }
39}
40/// This is the type of the message. \"tool-calls\" is sent to call a tool.
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "tool-calls")]
44    ToolCalls,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::ToolCalls
50    }
51}