! ArduinoGuru
04/29/2024, 8:38 PMVapi Support
04/29/2024, 8:38 PMVapi Support
04/29/2024, 8:39 PMjson
{
"functions": [
{
"name": "bookAppointment",
"description": "Used to book the appointment.",
"parameters": {
"type": "object",
"properties": {
"datetime": {
"type": "string",
"description": "The date and time of the appointment in ISO format."
}
}
}
}
]
}
[(1)]()
This function definition tells the assistant to use the bookAppointment
function during a conversation. To accurately capture and submit booking dates and times, your system prompt should clearly instruct the assistant on gathering this information from the user and using it to call the bookAppointment
function at the appropriate moment.
Remember to define your serverUrl
where Vapi can send the function call information, as this will enable the actual booking action on your backend.
json
"serverUrl": "YOUR_SERVER_URL_HERE"
Adjusting the conversational flow within the prompt can significantly improve the accuracy of date and time submissions. Ensure the assistant asks for the date and time explicitly and waits for the user's response before proceeding to call the function.
For a more detailed setup and examples, you might want to explore the [Function Calling]() section in the Vapi documentation.Vapi Support
04/29/2024, 8:46 PMSahil
04/29/2024, 8:49 PM! ArduinoGuru
04/29/2024, 8:49 PMSahil
04/29/2024, 8:50 PM! ArduinoGuru
04/29/2024, 8:50 PM! ArduinoGuru
04/29/2024, 8:50 PM! ArduinoGuru
04/29/2024, 8:50 PMSahil
04/29/2024, 9:01 PM! ArduinoGuru
04/29/2024, 9:03 PMSahil
04/29/2024, 9:04 PM! ArduinoGuru
04/29/2024, 9:04 PMSahil
04/29/2024, 9:05 PM! ArduinoGuru
04/29/2024, 9:05 PM! ArduinoGuru
04/29/2024, 9:06 PM! ArduinoGuru
04/29/2024, 9:06 PMSahil
04/29/2024, 9:06 PMSahil
04/29/2024, 9:06 PM! ArduinoGuru
04/29/2024, 9:06 PMSahil
04/29/2024, 9:08 PM! ArduinoGuru
04/29/2024, 9:09 PM