Call id example - e04004ce-074b-4240-9165-1b860cc7d0f7
-- Issue 1 - Check availability tool
I'm trying to book an appointment and every time it tries to check the calendar for availability, it says that we don't have an available time.
I checked the messages log and it's trying to check for 2023 dates. In this case, it checked:
"name": "get_free_slots",
"arguments": "{\n \"startDate\": 1697726400000,\n \"endDate\": 1697899200000\n}"
Which converts to October 19th, 2023 and October 21st, 2023.
If that matters, my assistant is using the model GPT 4o cluster.
Can you please help me fix this? I've tried talking to the Vapi AI chat on the docs website but I haven't been able to solve this yet.
--------
-- Issue 2 - get contact tool
On top of that, you'll notice that my get contact tool also failed even though it should have found a contact using the phone number that it searched.
{
"role": "tool_calls",
"time": 1747438157199,
"message": "",
"toolCalls": [
{
"id": "call_PjTEnxlAHXqRYHe9NyZwzfGU",
"type": "function",
"function": {
"name": "get_duplicate_contact",
"arguments": "{\"phone\": \"6477051165\"}"
}
}
],
"secondsFromStart": 55.081
}
It should have found a contact with this phone number /\ but the response was:
{
"name": "get_duplicate_contact",
"role": "tool_call_result",
"time": 1747438158482,
"result": "[\n {\n \"type\": \"text\",\n \"text\": \"Error: API Error: 422 Request failed with status code 422\"\n }\n]",
"toolCallId": "call_PjTEnxlAHXqRYHe9NyZwzfGU",
"secondsFromStart": 56.364
}
So it ended up using the create contact function. This worked, but it just updated the contact inside GHL because a contact already existed with that number. So it kind of worked in the end since it ended up on the same contact, but not as intended.
Thanks a lot!