Tools using snakecase on strict parameter validati...
# support
j
I am using camelcase for my parameters in the json schema but vapi is generating snake case parameter names, which is not compatible with my API. I am using the strict toggle, but still it's not using the exact names of my fields.
Okey, it's a lie, the actual data is coming in camelCase for all fields in the json, it's just that the https://dashboard.vapi.ai/webhooks is showing the fields in the body as snake but I am receiving it in my server as camel.
k
Ah, great catch Jorge, I'll shoot this over to the team so we can resolve it. Glad it's working for you though!
j
@User Now I realized that sometimes the request comes with snake case and other times it comes with camel case
I neeeded to add a mapping from snake case to cammel case in our API because of this inconsistency
k
Hey Jorge, can you share the call ID where it's coming in snake case for you? It's a camel case on our end. If by any chance you get a snake case, we'll have to fix it so you don't need to handle both cases.
j
The call ID was: call_PBvzx9K2VQ2sDgNvZpQrutdX In white you can see my server logs ( firebase ) In black you can see the vapi webhook logs The schema in the tools is with strict and looks like this: "ingredients": { "description": "Ingredients of the recipe", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "Name of the ingredient", "type": "string" }, "unit": { "description": "Unit of the ingredient", "type": "string" }, "pricePerUnit": { "description": "Price per unit", "type": "number" }, "quantityPerProduction": { "description": "Quantity per production", "type": "number" } }, "required": [ "name" ] } https://cdn.discordapp.com/attachments/1351226537151565835/1353672789952823389/image.png?ex=67e28187&is=67e13007&hm=68ad43ec22f0ca35872837f7446b1455c0987252ba0e7564ed7dc6011be80d2e& https://cdn.discordapp.com/attachments/1351226537151565835/1353672790363869214/image.png?ex=67e28187&is=67e13007&hm=25248be6b4f904fe3449ead09ad487a0eff857f45048c77fbd02ece89eb1fd90&
@User no updates on this?
k
Hey Jorge, the team has been informed about the snake case. Our messages are being sent as snake case instead of the camel case. By the end of this week, it will be fixed for sure.
j
great thanks
k
Hey Jorge, can you try another call and let me know how it goes for you? Now you won't be getting this issue in case you still receive snake case body in tools calls. Please share the call ID.
2 Views