Function Tool not triggering
# support
f
Hi @Vapi , currently on a live Assistant, the Function Tool which sends a Call Back email to client is not triggering for many calls. We cannot identify why exactly this is happening for certain calls. Could we please have assistant to identify the cause and solution? For comparison, here are two calls that have WORKED: 9145cbb4-621e-4c3e-b64b-788c5ac38047 4a06817e-7730-46b8-b05b-fd39bcb77166 Here is a call that DID NOT WORK: e9b5af34-9329-471c-b5ae-51294239771f
v
Hi there! šŸ‘‹ I'm unable to identify the exact cause of why your Function Tool isn't triggering for the specific call ID you provided (e9b5af34-9329-471c-b5ae-51294239771f). However, I can definitely help with general troubleshooting steps and debugging techniques for Vapi Function Tools that aren't triggering properly. Here are some troubleshooting steps you can take to identify the issue: ## Initial Configuration Checks - **Verify voice command configuration**: Check that your voice commands are correctly configured and input variables are properly mapped for the Call Back email function [source](https://docs.vapi.ai/tools/GHL). - **Check Server URL**: Ensure the server URL in your Vapi Dashboard is correct and accessible from outside your network [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1326809606671958080). - **Review Endpoint Configuration**: Verify your endpoint is set up to receive POST requests as per the Assistant Request docs [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1326809606671958080). - **Check if the tool is set to
synchronous
instead of `async`**: This could affect how the tool processes requests [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342315282198298729). - Verify
endCallFunctionEnabled
is set to true
in your dashboard [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1313293840580612166). ## Analyze Call Data and Logs - **Compare the working and non-working calls**: Using the call IDs you provided (working: 9145cbb4-621e-4c3e-b64b-788c5ac38047, 4a06817e-7730-46b8-b05b-fd39bcb77166; not working: e9b5af34-9329-471c-b5ae-51294239771f), check the logs for differences.
- **Check for Errors**: Look into your server logs for any errors that might be preventing the webhook from being called [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1326809606671958080). - **Examine Vapi Logs**: Check the logs on the Vapi side to see if there's any indication of incoming requests from your server [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336456720913797238). ## Review Recent Changes - **Review Recent Changes**: If you made changes recently, review them to see if any could have affected the webhook functionality [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1326809606671958080). - **Check Commit History**: If using version control, review the commit history to see if any recent changes might have caused the issue [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334114042876264518). ## Advanced Debugging - **Create a Simple Test Scenario**: Create a simple scenario that sends a basic request to Vapi to see if it works, which could indicate if the issue is with the complexity of your original implementation [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336456720913797238). - Ensure clear context is provided to the model that the function tool is meant to be executed and not spoken [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331648945818177586). Is there any specific part of these troubleshooting steps you'd like me to elaborate on, or would you like more information about any particular aspect of Function Tools? Sources: - [Troubleshooting steps for Vapi Function Tool not triggering](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1326809606671958080)
- [Debugging techniques for Vapi Function Tool](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336456720913797238) - [Vapi Function Tool configuration options and troubleshooting](https://docs.vapi.ai/tools/GHL) - [How to analyze call data to identify issues with Vapi Function Tool](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334114042876264518)
f
Hi team, we've had another call with this same issue. WORKED: 9145cbb4-621e-4c3e-b64b-788c5ac38047 4a06817e-7730-46b8-b05b-fd39bcb77166 DID NOT WORK: e9b5af34-9329-471c-b5ae-51294239771f 5e9f7ade-13a8-4f1c-8314-30495ffa2a99 (new)
s
Hey Beck, can you try a few calls without KB? Most likely the issue is how KB is being used here. I suggest you try two to three calls without KB and then see if Tools' call is triggering for you or not. let me know how it goes for you
Back a friendly reminder to continue this thread
f
Hi @Shubham Bajaj Thanks for your input and we've done testing without the KB and unfortunately it did not fix the issue. This is very high priority for us, We are struggling to keep up with monitoring these call backs manually. We were hoping to take a look at this on our meeting we planned for the other day too. Is there anyone available to help us resolve this as soon as possible? We had another important call from yesterday that did not trigger and was missed: 75e3d6c5-47a4-4c52-a0c5-86da408d8049
s
Hi, checking if this is resolved/solved for you?
h
@Shubham Bajaj this has not been resolved yet. Here's another example of one this morning Call ID: 1e48a53f-e36b-4f4d-b0e9-feb4365d9a6b
s
looking into it.
s
Call ID: 75e3d6c5-47a4-4c52-a0c5-86da408d8049 Knowledge base used: "knowledgeBase": { "provider": "trieve", "name": "carina-reception", "searchPlan": { "searchType": "semantic", "topK": 10, "removeStopWords": true, "scoreThreshold": 0.2 }, "createPlan": { "type": "import", "providerId": "1b688224-9881-4028-a46b-8ae5bd8ff6d3" } }, "knowledgeBaseId": "2e229a87-ee42-4fb7-8e48-e91c3f3dd8f0", Call ID: 1e48a53f-e36b-4f4d-b0e9-feb4365d9a6b KB Used: YES logs { "role": "tool_calls", "time": 1743986112622, "message": "", "toolCalls": [ { "id": "call_kDvkfFsSi19CCWJV2P5M4in3", "type": "function", "function": {"name": "endCall", "arguments": "{}"} } ], "secondsFromStart": 93.252 }, { "role": "bot", "time": 1743986113898, "source": "", "endTime": 1743986115978, "message": "We hope to see you soon at Carina Leagues Club", "duration": 2080, "secondsFromStart": 95.11 }, { "name": "endCall", "role": "tool_call_result", "time": 1743986116499, "result": "Couldn't Find Local Tool endCall", "toolCallId": "call_kDvkfFsSi19CCWJV2P5M4in3", "secondsFromStart": 97.129 } šŸ”µ 00:35:12:622 [user LOG] Model called tool: endCall() šŸ”µ 00:35:12:622 Converted Requested Tools Calls To Internal Format. [ { "type": "endCall", "function": { "name": "endCall", "description": "Use this function to end the call. Only use it when following instructions that explicitly ask you to use the endCall function. DO NOT call this function unless you are instructed to do so." }, "messages": [ { "type": "request-start", "blocking": false, "content": "We hope to see you soon at Carina Leagues Club. Good bye.", "contents": [], "conditions": [] } ], "toolCall": { "id": "call_kDvkfFsSi19CCWJV2P5M4in3", "type": "function", "function": {"name": "endCall", "arguments": {}} } } ] for this call, if you change the endCall tool name to something like 'customEndCall', it will work. The endCall name is a reserved keyword, so you cannot use reserved keywords as a function name. If you try to use similar names (e.g., transferCall), it will also fail.
@firefly_0206 So coming to the conclusion again for the last 2 calls, KB was not removed. What happens is when you use Trieve based KB, the model tries to use KB when you are expecting it out to invoke the tool, considering user input as out of context. Using a query-based KBTool will resolve this as you are using a tool call and defining the rules when to use the KB. The hallucinations of the model or let's say unexpected working of the model where it was supposed to do the tool calling and instead doing the KB calling will be resolved because now you are defining the rules when to invoke the tool which is used when user input is out of context and KB needs to be used to answer the user. Try using query-based KBTool it will resolve and solve your problem. https://docs.vapi.ai/knowledge-base
f
@Shubham Bajaj For this ticket, it is not the "endCall" function we are needing to fix. It is the callbackRequest function tool. And can you please provide more information or examples re "reversed keywords" for function names? Do you have any resources available?
Hi @Shubham Bajaj , I was able to test with the Query Based KB tool although we were experiencing a high volume of misinformation and glitching with the Assistant. We need to stay on Openai with gpt-4o for the performance which i see Query Base KB does not currently support. I also just wanted to follow up on my last comment regarding the callbackRequest function tool (not endCall) and more information on reversed keywords. Thanks.
s
hey beck share the call ID for query tool not working as expected in the below format. 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!
The reserved keywords are such as transferCall, endCall, function and so on, which are specific to VAPI, so you don't have to worry about generic names.
f
Hi @Shubham Bajaj , here are some call examples when testing Query Tool KB. Call ID: 52e1d963-60f8-4e0a-8ebc-0c10534d568d 00:14 - Assistant glitches for about 10 seconds Call ID: 5ad4bf19-36e9-4bf9-a821-cdd7199c7bb5 00:28 - Assistant interprets "anzac day" as "today" (this doesnt happen on openai gpt4o) 00:41 - Assistant glitches 00:55 & 01:04 - After being asked "what time are you open on Anzac Day" the assistant says "we are open on anzac day" and does not give the time. Call ID: a405c4ec-cc04-4f8d-afaa-91730293e89e 00:14 - Assistant does not give accurate information (on openai gpt4o, the assistant says opening hours of lunch and dinner, where as here, it only gives dinner hours) Due to the above testing performance, swapping to Google + Gemini-1.5-flash (which states on documentation that Query Tool only support this) is not ideal. There is a huge impact on the output of information and quality. So we are not able to change to the Query tool for this.
s
Hey Beck, It's gone a lot of back-and-forth, and I don't think it's better to continue like this. If we could get on a call, I won't miss it as last time because last time it was an odd time for me as well (which I took as a challenge but failed to). This time, most probably in early days. Maybe in US time, we can connect for half an hour to an hour and resolve all of your questions/enquiries at once. Let me know if this works for you.
f
Hi @Shubham Bajaj , I will DM you regarding the call. thanks.
s
Hey Beck, he is OOO. Can you DM me?
f
@Sahil @Shubham Bajaj This is now becoming extremely frustrating. I have emailed, DM'd and even messaged on Whatsapp (as per your request). I have tried numerous times to get multiple issues resolved and organise an online meet with Vapi Support but it takes weeks to just lock in a time. There is no clear communication from support. I am constantly being asked to send emails, messages and DMs - We are being sent around in circles and this has been happening for months. Can anyone from @Vapi support meet online and resolve these issues with our Team effectively? We organised an online meet between 11AM - 2PM Indian Standard Time (IST) - which is within reasonable IST hours and it was accepted. Unfortunately no one jumped online with us and we are being told it is in odd time? We are coordinating with multiple team members in Australia and willing to work with IST timezone - we are not receiving clear communication to negotiate a suitable time? So if there is anyone available from @Vapi , can you please comment and tag me in this post to organise a meet.
s
@firefly_0206 Hey Beck, I was out of office for a couple of days, so couldn't reply to earlier. I completely understand your frustration - you're trying to get it to work, and it's not working. It's obvious that you'll get frustrated. Regarding the support, we did try to help you out. We even tried to get you in DMs to help things sort out for you. I suggested a time when I'm available for the call. In your previous thread where I'd give a new detailed solution (hey, this needs to be done, and this is how it needs to be done), I understand you couldn't follow it correctly and couldn't make proper use of it. That's why then I came into a thought like "ok, let's get on a call and resolve it for you." So I don't think apart from one incident that we are not replying to you or not getting back to you. In that one incident, the call was missed because it was in afternoon time where we're most likely not available due to our schedule. we want to help you out.
@firefly_0206 Now it's up to you how you want to continue the conversation either here or in DM's and communication regarding the solution I already told you. You have to move to a query-based tool for KB, so then your hallucination issues and tools not triggering etc all of such issues will be resolved...
3 Views