Server is sending arguments, but VAPI is not picki...
# support
t
My server sent this to VAPI:
Copy code
{'id': '1276c188-4060-4406-9f1b-b7df114a3660', 'object': 'chat.completion.chunk', 'created': 1725740448, 'model': 'gpt-4o-2024-05-13', 'choices': [{'index': 0, 'delta': {'role': 'assistant', 'content': None, 'tool_calls': [{'index': 0, 'id': '557f9b63-b6d0-4443-953d-3ebc80e43b02', 'function': {'name': 'get_availability', 'arguments': {'startDate': '2024-09-09', 'endDate': '2024-09-17'}}, 'type': 'function'}]}, 'finish_reason': None}], 'usage': None, 'system_fingerprint': 'fp_157b3831f5'}
In VAPI Call log, arguments are empty
Copy code
{
  "role": "tool_calls",
  "time": 1725740448809,
  "message": "",
  "toolCalls": [
    {
      "id": "557f9b63-b6d0-4443-953d-3ebc80e43b02",
      "type": "function",
      "function": {
        "name": "get_availability",
        "arguments": "{}"
      }
    }
  ],
  "secondsFromStart": 27.923
}
What am I doing wrong? Call ID: 7777220d-803d-4375-ad74-ce91ee5a3458
v
@Tanush It seems like there might be an issue with the way the arguments are being formatted or transmitted to VAPI. In the server message you sent, the arguments for the
get_availability
function are provided as a JSON object with
startDate
and
endDate
keys. However, in the VAPI Call log, the arguments appear as an empty JSON object (
"{}"
). To resolve this, please ensure that the arguments are being serialized correctly as a JSON object before sending them to VAPI. The correct format should look like this:
Copy code
json
"arguments": {
  "startDate": "2024-09-09",
  "endDate": "2024-09-17"
}
Make sure that the content-type of your request is set to
application/json
and that the JSON is properly structured as per the VAPI requirements. If you've confirmed that the request is correctly formatted on your end, there might be an issue with the VAPI receiving or logging the arguments, in which case you should contact VAPI support for further assistance.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
t
@Shubham Bajaj
@User ??
s
let me know how it goes.
logs
šŸ”µ 20:20:48:807 [user LOG] Model called tool: get_availability([object Object]) šŸ”µ 20:20:48:808 Requesting "tool_calls": Call 1 of 1
get_availability
. args: [object Object]...
because of no response closing this ticket.
2 Views