hilarious-sapphire
hilarious-sapphire4mo ago

in vapi docs it says this is the standard format vapi sends to my server during a tool call

is { "message": { "timestamp": 1678901234567, "type": "tool-calls", "toolCallList": [ { "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "name": "get_weather", "arguments": { "location": "San Francisco" } } ], "toolWithToolCallList": [ { "type": "function", "name": "get_weather", "parameters": { "type": "object", "properties": { "location": { "type": "string" } } }, "description": "Retrieves the current weather for a specified location" }, "server": { "url": "https://your-api-server.com/weather" }, "messages": [], "toolCall": { "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "type": "function", "function": {...... But in reality, I get this: { "message": { "timestamp": 1678901234567, "type": "tool-calls", "toolCalls": [ { "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "name": "get_weather", "arguments": { "location": "San Francisco" } } ], "toolCallList": [ { "id": ".... had to clip both JSONs for brevity. The point im highlighting is the extra "toolCalls" before the "toolCallList" The question is what is the actual part of the payload i should be paying attention to. lots of seemingly repeated info, not explained in docs.
3 Replies
Sahil
Sahil4mo ago
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead
This would really help us figure out what went wrong!
hilarious-sapphire
hilarious-sapphireOP4mo ago
nothing went wrong. Im asking for clarification on the payload we get every single time there is a tool call. the docs tell me i will get this: "toolCallList": [ { "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "name": "get_weather", "arguments": { "location": "San Francisco" } } ], but in reality, I get that, and this: "toolCalls": [ { "id": "toolu_01DTPAzUm5Gk3zxrpJ969oMF", "name": "get_weather", "arguments": { "location": "San Francisco" } } ], "toolCallList": [ I'm asking for clarification on the purpose of the "toolCalls" array. and basically, should i be paying attention to it?
Sahil
Sahil4mo ago
Nope, you can ignore it.

Did you find this page helpful?