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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ToolCallFunction {
17 /// This is the name of the function the model called.
18 #[serde(rename = "name")]
19 pub name: String,
20 /// These are the arguments that the function was called with.
21 #[serde(rename = "arguments")]
22 pub arguments: serde_json::Value,
23}
24
25impl ToolCallFunction {
26 pub fn new(name: String, arguments: serde_json::Value) -> ToolCallFunction {
27 ToolCallFunction { name, arguments }
28 }
29}