fair-rose
fair-rose4mo 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
Vapi
Vapi4mo ago
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-rose
fair-roseOP4mo 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 ?
Shubham Bajaj
Shubham Bajaj4mo ago
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
dependent-tan4mo ago
@Floris , I wanted to check if passing nested level properties is really important, flatten properties will work for you?
fair-rose
fair-roseOP4mo 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
rising-crimson4mo 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
dependent-tan4mo 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-rose
fair-roseOP4mo ago
Any progress on this @Shubham Bajaj ?
Shubham Bajaj
Shubham Bajaj4mo ago
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
dependent-tan3mo ago
Hey @Floris and @prantheman You have to increase the max tokens limit to 500 or 1000 and then this will be resolved.
fair-rose
fair-roseOP3mo ago
How can you do that, @Shubham Bajaj ?
rising-crimson
rising-crimson3mo ago
Thanks
Shubham Bajaj
Shubham Bajaj3mo ago
Marking this ticket as Solved ✅

Did you find this page helpful?