fair-rose•4mo ago
Empty custom tool call argument when payload gets too big?
I'm building a room service assistant which helps a guest compile an order before it's submitted via a custom tool call. This works great when I add two items. But when I add a third item, the arguments for the tool call are empty. You can clearly see it in the attached call id. I try to place an order with 3 items first which triggers the createOrder tool call with empty arguments. I then remove an item from the order and try again. This time it triggers the createOrder tool call with arguments. I'm not sure what's wrong. Is there a max arguments payload or something?
Call id: 101ee0b5-7b50-451e-b72e-a1f876eaf2d1
14 Replies
Yes, there appears to be a payload size limit affecting your tool calls. According to Discord discussions, Vapi has a request body size limit of approximately 100KB, which can cause issues when payloads get too large.
Try reducing your payload size by:
- Limiting the amount of data sent in each order
- Removing unnecessary fields from your order objects
- Splitting large orders into multiple smaller tool calls
Sources:
- Discord discussion about payload size limits
- Discord report about empty arguments with large payloads
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
fair-roseOP•4mo ago
Could someone from the @Vapi Team please have a look? I need this fixed rather urgent and it doesn't seem like I can do something about it from my end.
@Shubham Bajaj ?
looking into it.
Here floor is, I just logged into the shared call id and created the order function JSON schema. The function JSON Schema is complex, not easy. Ideally based on prompt transcription and tool JSON schema and similarity search. Models are supposed to send the right parameters, but you know models are still black and white and boxes, so allow me some time to review it again to see what can be done for your use case by dropping down the nesting levels or making it flatten parameters tool.
dependent-tan•4mo ago
@Floris , I wanted to check if passing nested level properties is really important, flatten properties will work for you?
fair-roseOP•4mo ago
@Shubham Bajaj I don't think I can flatten the properties. I need to keep track of what modifications were made to certain order items.
rising-crimson•4mo ago
Did you ever end up fixing this @Shubham Bajaj dealing with the same issues
When I have a longer list of objects to send in the args, the entire args object is empty
@Floris
dependent-tan•4mo ago
@Floris @prantheman I apologize for the delay in my response. I am still in the process of completing my work on this matter. I will require approximately one to two days more for this issue investigation. Once I have completed, I will promptly provide you with potential solutions or alternatives.
fair-roseOP•4mo ago
Any progress on this @Shubham Bajaj ?
Hey,
Could you please schedule a brief call at your convenience so we can discuss this matter in detail?
Kindly use the following link to book a suitable time: https://calendly.com/shubham-vapi/chat-30m.
dependent-tan•3mo ago
Hey @Floris and @prantheman
You have to increase the max tokens limit to 500 or 1000 and then this will be resolved.
fair-roseOP•3mo ago
How can you do that, @Shubham Bajaj ?
rising-crimson•3mo ago
Thanks
Marking this ticket as Solved ✅