Tool calling not working
# support
v
Hi, I'm having problems with function calling. I have made a webhook using make.com and I used it to confirm if an address is valid. However, it returns different string than it is suppose to. Here is the body returning from make.com: { "results": [ { "toolCallId": "{{1.message.toolCalls[].id}}", "result": "The address is invalid" } } ] } And here it what I got from logs (messages) in VAPI: { "name": "isAddressCorrect", "role": "tool_call_result", "time": 1724223960602, "result": "Success.", "toolCallId": "call_S1puKIR0bThuM6kDICU3tSY1", "secondsFromStart": 22.885 } It seems so that Vapi doesnt understand the result or changes it for some reason. Call_id is: 84b6e640-be81-4828-a4bb-e80881160936
v
@Vapi-enjoyer I'm sorry to hear you're experiencing issues with your function calling and the webhook integration. It looks like there might be a discrepancy between the response from make.com and what is being logged in VAPI. To address this, we need to ensure that the webhook is correctly configured to send the expected result to VAPI and that VAPI is correctly interpreting and logging the result. Could you please confirm if the webhook at make.com is set up to send the response in the format that VAPI expects? Additionally, it would be helpful to check if there are any transformations or mappings applied within make.com that might alter the response before it reaches VAPI. If everything seems correct on the make.com side, we may need to look into the VAPI logs and configurations to understand why the result is being logged as "Success." instead of the actual string "The address is invalid". Since I don't have access to the system configurations or logs, I would recommend checking these points. If the issue persists, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
v
@Shubham Bajaj this is same kind of problem that was mentioned in an other ticket
i always get the "result": "Success.", even if the webhook doesn't return anything
Maybe @Sahil could help
s
share the latest call_id
v
Call_id is: 84b6e640-be81-4828-a4bb-e80881160936
Or: d80a777f-230d-4aac-a774-47ae62978b83
@Sahil
s
@Vapi-enjoyer the tool call was resolved so it was success what you can do is instead return error if you require.
what happens is vapi will use result to generate the model output so status here doesn't has any implication on the result content.
v
@Shubham Bajaj I'm not sure that what you are saying is correct. I have an example, where the "result" had the correct information, in this screenshot. This is another instance that I used, where I confirmed the correct ingredients of a pizza. Call_id: c5289ce3-594a-4614-b999-385339acf1f3 https://cdn.discordapp.com/attachments/1275713889266438174/1276228949164298310/image.png?ex=66c8c454&is=66c772d4&hm=721446f6ba655ae05266906ad7e87249e95d1e993f2091dc1c6b3578630f8a4d&
Also, it's not a problem if it's "succes.", but the model doesn't seem to get any information, except the result field. Atleast the picture that I sent is the only time that tool call actually worked as it should.
I'm not sure if this a bug or what, but I would need this fixed or a proper information (not https://docs.vapi.ai/tools-calling), of how to fix this bug
We are building this service to a customer, but we might have to build the whole software ourselves if this doesn't work properly
Also, it returns Success. even if my make.com webhook was not running
So this problem is on Vapi side
s
call id.
v
0397daad-73f9-48aa-86df-ad924547cd79
I think that it returns success no matter what I do
n
Copy code
"toolWithToolCallList": [
    {
      "type": "make",
      "function": {
        "name": "isAddressCorrect",
        "async": false,
        "parameters": {
          "type": "object",
          "properties": {
            "Address": {
              "type": "string",
              "description": "Address of the location"
            }
          }
        },
        "description": "Check if the address is correct. "
      },
      "async": true,
      "server": {
        "url": "https://hook.eu2.make.com/3sq6uoaohiicsg7genrydfyf4s4e76bm"
      },
      "messages": [],
      "toolCall": {
        "id": "call_S1puKIR0bThuM6kDICU3tSY1",
        "type": "function",
        "function": {
          "name": "isAddressCorrect",
          "arguments": {"Address": "growth"}
        }
      }
    }
  ]
i checked your original call: 84b6e640-be81-4828-a4bb-e80881160936 the issue is you're setting tool.async=true this means the result is not waited upon. whenever in doubt, read the docs at api.vapi.ai/api https://cdn.discordapp.com/attachments/1275713889266438174/1276234556684374016/image.png?ex=66c8c98d&is=66c7780d&hm=dc9614fa0533187f0ec90354a43ee2e5e5c58ab8ecf61ab131e377997630c14a&
v
Thank you @nikhil! ❤️
3 Views