VAPI API automatically clears my tools
Hey, running into an issue with my outbound VAPI agent. When running the PATCH request to update my assistant, it automatically removes/clears any custom functions/tools I've set inside the VAPI dashboard. I end up having to re-add it manually each time the PATCH request runs, which won't work when running the workflow when it's activated.
According to GPT, after analyzing the VAPI docs, VAPI doesn't support API requests for tools, but does so for everything else. I use the following JSON which works great with updating the assistant, besides the fact that it removes my tools.
{{
{
"firstMessage": $json.firstMessage,
"firstMessageMode": "assistant-waits-for-user",
"transcriber": {
"provider": "deepgram",
"language": "en-US",
"smartFormat": true,
"model": "nova-2-phonecall"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": $json.systemPrompt
}
]
}
}
}}
Not sure what to do here. Is there a way to add dynamic variables directly in the VAPI dashboard instead of updating your assistant via API?
According to GPT, after analyzing the VAPI docs, VAPI doesn't support API requests for tools, but does so for everything else. I use the following JSON which works great with updating the assistant, besides the fact that it removes my tools.
{{
{
"firstMessage": $json.firstMessage,
"firstMessageMode": "assistant-waits-for-user",
"transcriber": {
"provider": "deepgram",
"language": "en-US",
"smartFormat": true,
"model": "nova-2-phonecall"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": $json.systemPrompt
}
]
}
}
}}
Not sure what to do here. Is there a way to add dynamic variables directly in the VAPI dashboard instead of updating your assistant via API?