function tool returns everything instead of single...
# support
d
Call id:
b0d80102-26a0-4e22-babb-81afde52c789
VAPI calls my endpoint with full conversation message, including model type, voice, messages, transcripts etc. Instead of simple jsob object. In logs object is displayed correctly
{"guid":"977a381c-d1c3-4820-81b2-3baa0241f58b"}
, but my endpoint receives everything:
Copy code
{"message":{"timestamp":"2024-09-10T13:56:56.343Z","type":"tool-calls","toolCalls":[{"id":"call_Xsim(...)","type":"function","function":{"name":"sendSMS","arguments":{"guid":"977a381c-d1c3-4820-81b2-3baa0241f58b"}}}],"toolCallList":[{"id":"call_Xsim(...)","type":"function","function":{"name":"sendSMS","arguments":{"guid":"977a381c-d1c3-4820-81b2-3baa0241f58b"}}}],"toolWithToolCallList":[{"type":"function","function":{"name":"sendSMS","async":false,"parameters":{"type":"object","properties":{"guid":{"type":"string","description":"Identyfikator wiadomości"}}},"description":"Wysyła wiadomość do osoby z którą prowadzisz rozmowę."} (...)
v
@DoubleA It seems like there might be a discrepancy between what is logged and what is actually being sent to your endpoint. This could be due to a configuration issue or a misunderstanding of the expected payload structure. To address this, please ensure that your endpoint is configured to parse the incoming payload correctly. If you're expecting a simple JSON object, verify that the webhook settings in VAPI are set to send only the required data. If you've already checked your endpoint configuration and the issue persists, it might be necessary to review the VAPI documentation or settings to ensure that the payload structure is defined correctly. If you need further assistance with this, please don't hesitate to reach out to VAPI support for more detailed guidance on configuring the payload for your specific needs. If there's anything else I can assist you with regarding the VAPI, please let me know!
You can continue this conversation by mentioning me in the message.
d
Endpoint is setup correctly, it has only one field as described above. Prompts are setup correctly as per log I can see that object should be good. My endpoint receives everything, rather than just described JSON.
@User I cannot press "Ask for help" so I have to do it this way
s
@DoubleA can you try now we have released set of small changes and let me know how it goes.
d
@Shubham Bajaj Unfortunately I still have same issues, and here is a fresh call id:
1748b0f3-3eac-490f-bcbe-920b074c1d05
I also see that there is another interesting thing in Messages tab I see that message with
tool_calls
field
arguments
is string shouldn't it be object, containing (in my case) property
guid
?
Copy code
{
  "role": "tool_calls",
  "time": 1726045343747,
  "message": "",
  "toolCalls": [
    {
      "id": "call_ID",
      "type": "function",
      "function": {
        "name": "sendSMS",
        "arguments": "{\"guid\": \"ThisIsSomeGUID\"}"
      }
    }
  ],
  "secondsFromStart": 79.483
}
s
we are sending you correct payload, for more details, you can check here: https://api.vapi.ai/api-json and navigate to Components > Schemas > ServerMessageToolCalls.
d
@Shubham Bajaj that would be correct, I receive same schema. This is not, explained in the Documents. This probably should be described, what to expect. This one can be marked as solved.
s
ThankYou @DoubleA
4 Views