Elia
03/14/2025, 1:43 PMElia
03/14/2025, 1:49 PMElia
03/14/2025, 2:07 PMSoulAuctioneer
03/14/2025, 9:42 PMPraveen
03/15/2025, 9:51 PMmarkdown
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Retrieves current weather for the given location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and country e.g. Bogotá, Colombia"
},
"units": {
"type": "string",
"description": "Units the temperature will be returned in.",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location", "units"]
}
}
}
When creating a function tool via the API, you need to follow the OpenAI Function Calling schema format, which Vapi has implemented. Above's how to define an enum in your function parameters.Praveen
03/15/2025, 9:52 PM