Tanush
09/07/2024, 8:25 PM{'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
{
"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-ce91ee5a3458Vapi
09/07/2024, 8:26 PMget_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:
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.Vapi
09/07/2024, 8:26 PMVapi
09/07/2024, 8:27 PMTanush
09/07/2024, 8:43 PMTanush
09/09/2024, 7:51 AMShubham Bajaj
09/09/2024, 4:29 PMShubham Bajaj
09/09/2024, 4:29 PMShubham Bajaj
09/09/2024, 4:29 PMlogs
šµ 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]...Shubham Bajaj
09/13/2024, 3:11 PM