Issue with calling multiple tools in a call.
# support
p
Hey, thank you for building this amazing tool. I'm encountring an issue and would appreciate if anyone would point me in right direction. I've 3 tools in Assistant, which are also visible when I make GET request to assistant. My prompt calls all 3 fucntions. But during a call, only one of them is being executed. If first tool is executed, other 2 wont even be called. I tested and stopped calling 1st tool from prompt, so 2nd tool was executed but not 3rd. Then didnt call first 2 tools and only 3rd tool worked. Could there be any reason why only 1 tool is being called during a call? Is it just prompt engineering? if so are there any good prompts that effectively calls all tools in an assistant?
v
@Prabhu I'm glad to hear you're enjoying the tool! It sounds like you're experiencing an issue with executing multiple tools during a call. This could be due to a variety of reasons, including the way the prompt is structured or a limitation within the Assistant's configuration. To ensure that all three tools are called effectively, you might want to consider using a parallel execution strategy if the tools can operate independently of each other. This can be done using the
multi_tool_use.parallel
function, which allows multiple tools to be executed at the same time. Here's a general approach you can take: 1. Make sure that each tool can be called independently and doesn't rely on the output of another tool. 2. Structure your prompt to call the
multi_tool_use.parallel
function with the appropriate parameters for each tool. 3. Test the new prompt to ensure that all tools are being executed as expected. If you provide me with the names of the tools and the parameters they require, I can help you construct a prompt that uses the
multi_tool_use.parallel
function to call all three tools simultaneously. If the tools do depend on each other's outputs, we may need to consider a different approach.
You can continue this conversation by mentioning me in the message.
p
Here are 3 tools. 1st tool is pretty independent. it's just for updating Google Sheets. 3rd is bit dependent on 2nd tool as 2nd tool 'getAvailability' provides free tmeslots which are used while calling 3rd tool 'bookMeeting' https://cdn.discordapp.com/attachments/1257951702133375067/1257952779255808011/VAPItools.txt?ex=66864752&is=6684f5d2&hm=a480def13fa41e3aed932284d3d60e8d410d7027f3cf9be09bbf4a3ed5b66ae2&
Even if they are independent of each other, how would "multi_tool_use.parallel" work? Where should I add it in Assistant payload?
c
change he server url.
Of course it is going to call all 3 off the same tools if they are using the same server. so make a PATCH request to update the server as you can't do it via dashboard @Prabhu
Also are those real urls? xxx/yyy/zzz?
p
It's using different server URLs which are triggering 3 different automation. I just replaced actual webhook with xxx, yyy, zzz, since exposing them could lead anyone calling those servers
s
call_id pls
p
Have made lot of calls. But here are recent ID's 161c573b-2dee-40e5-ab01-d1a01435234c (triggered 2nd tool, but not 3rd) 20d85c16-c4d1-4c26-a06d-e032045ed2fb (directly triggered 3rd, as Id removed 1st & 2nd from prompt)
Any update on this?
s
Sorry about the delay. @Shubham Bajaj can you please help?
s
@Prabhu your tool calls failed and returned the following, please check the tools response format. Error Message
Copy code
Server Message Failed: https://hook.eu2.make.com/padvd88h4e2opn553wfitodji6tl65yb)

Error: {
  "message": {
    "message": "Request failed with status code 400",
    "data": "Queue is full."
  }

  "AxiosError: Request failed with status code 400
Expected Response Format, more https://docs.vapi.ai/tools-calling
Copy code
json
{
    "results": [
        {
            "toolCallId": "X",
            "result": "Y"
        }
    ]
}
p
@Shubham Bajaj thank you for responding. We'll be using Squads instead as they seem to be more efficient with mulitple tools. But when I make call with SquadID and use Assistant Overrides for variables names, they're not overriding the way they used to override while using assistantID in call. Is this not supported? CallID for reference: c024f50e-4b80-4986-aa0b-fced5a72f0ed
Also why are tool calls failing? Its showing good response in N8N (server)
s
Sorry for the dealyed resoonse allow me sometime I will check.
Sorry I cross checked it again, it's not tool call. That's because of conversatioon-update server event.
Hey you have to pass these assistantOverrides with the assocaite squad assistant as your making call using squad.
p
Sorry but I dont get it. Asked VAPI AI & its just telling to use this payload
Copy code
{
  "customer": {
    "number": "<phone_number>"
  },
  "squadId": "<your_squad_id>",
  "assistantOverrides": {
    "variableValues": {
      "name": "John",
      "product": "Widget X"
    }
  },
  "phoneNumberId": "<your_phone_number_id>"
}
Is this not correct?
s
Yes it's not working, you can use either member overrides or assistant overrides inside the squads such as
Copy code
json
{
    "squad": {
        "members": [
            {
                "assistantId": "",
                "assistantOverrides": {
                    "variableValues": {
                        "name": "Richie Rich"
                    }
                }
            }
        ],
        "membersOverrides": {
            "variableValues": {
                "name": "Richie Rich"
            }
        }
    },
    "phoneNumberId": "",
    "customer": {
        "number": ""
    }
}
I will look into this and get back to you.
5 Views