then-purpleT

Where to create and how to modify Tools Calling

I am going through the https://docs.vapi.ai/tools-calling documentation and trying to figure out where I would modify the payload to get this working. In the vapi dashboard, I've updated the 'Server Url' to point to my server, and the function is being correctly triggered in the following format:

{
"message": {
"type": "function-call",
"call": { Call Object },
"functionCall": {
"name": "sendEmail",
"parameters": "{ "emailAddress": "john@example.com"}"
}
}
}

Do I have to modify the above request payload to the below format,

{
"type": "function",
"messages": [ ... ],
"function": { ... },
"async": false,
"server": { ... }
}

I'm not understanding where this payload change should occur.

Thanks for the assistance!
Vapi
Learn how to create and configure Tools Calling with Vapi.
Was this page helpful?