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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct ClientMessageToolCalls {
19    /// This is the type of the message. \"tool-calls\" is sent to call a tool.
20    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
21    pub r#type: Option<Type>,
22    /// This is the list of tools calls that the model is requesting along with the original tool configuration.
23    #[serde(rename = "toolWithToolCallList")]
24    pub tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>,
25    /// This is the list of tool calls that the model is requesting.
26    #[serde(rename = "toolCallList")]
27    pub tool_call_list: Vec<models::ToolCall>,
28}
29
30impl ClientMessageToolCalls {
31    pub fn new(
32        tool_with_tool_call_list: Vec<models::ClientMessageToolCallsToolWithToolCallListInner>,
33        tool_call_list: Vec<models::ToolCall>,
34    ) -> ClientMessageToolCalls {
35        ClientMessageToolCalls {
36            r#type: None,
37            tool_with_tool_call_list,
38            tool_call_list,
39        }
40    }
41}
42/// This is the type of the message. \"tool-calls\" is sent to call a tool.
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
44pub enum Type {
45    #[serde(rename = "tool-calls")]
46    ToolCalls,
47}
48
49impl Default for Type {
50    fn default() -> Type {
51        Self::ToolCalls
52    }
53}