vapi_client/models/
tool_call_function.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 ToolCallFunction {
19    /// This is the name of the function the model called.
20    #[serde(rename = "name")]
21    pub name: String,
22    /// These are the arguments that the function was called with.
23    #[serde(rename = "arguments")]
24    pub arguments: serde_json::Value,
25}
26
27impl ToolCallFunction {
28    pub fn new(name: String, arguments: serde_json::Value) -> ToolCallFunction {
29        ToolCallFunction { name, arguments }
30    }
31}