Tools/Functions
# support
u
Call ID: 3b037d39-e960-4ee6-8a66-019def412519 My ai is calling the tool over and over instead of waiting for a response from the make automation? Any ideas
v
@! John Jahshan It sounds like there might be an issue with the implementation of your AI's logic when interacting with the make automation tool. To help you better, I would need to understand how your AI is structured to call the tool and handle responses. However, here are a few general suggestions that might resolve the issue: 1. **Check for Asynchronous Handling**: Ensure that your AI is designed to handle asynchronous operations. It should wait for a response from the make automation tool before attempting another call. 2. **Implement Callbacks or Promises**: If your AI is using callbacks or promises, make sure they are set up correctly to handle the response from the make automation tool. 3. **Rate Limiting**: Implement rate limiting to prevent the AI from calling the tool too frequently. This can be done by setting a timeout or delay between calls. 4. **State Management**: Make sure your AI maintains the state of each call. It should not initiate a new call if the previous one is still pending. 5. **Error Handling**: Proper error handling can prevent repeated calls if the initial call fails. Ensure that your AI can distinguish between a failed call and a successful one that's still awaiting a response. 6. **Logging**: Implement detailed logging to track each call and response. This can help you identify where the loop is occurring. If you can provide more details or context about how your AI is making calls to the make automation tool, I can offer more specific advice. Otherwise, please check the points above to troubleshoot the issue.
You can continue this conversation by mentioning me in the message.
u
none of those from my knowlege
@Vapi
v
@! John Jahshan Please ask support for more info on this.
u
@User
c
Is it async or no?
s
set tool async to false
u
that was the first thing i checked, its set to false, ive had this happen on another account too a week ago and it just fixed itself without me changing anything https://cdn.discordapp.com/attachments/1261002051412951163/1261024097622560818/Capture.PNG?ex=669173b5&is=66902235&hm=11dfe0790ffd028871f85d47f0e832b2fe2cd823d06a70af8be75125771c3dc3&
c
We are having the same problem, never had this problem with functions, and also seems like the webhook response that we send back to VAPI tools doesn't reach the bot, e.g. if we query available alternative time slots in MAKE and send it back to the tool as a webhook response, the bot would suggest random slot instead of following the slots we've sent as a response. @User
u
try to format the webhook response from make using the tool call response format { "results": [ { "toolCallId": "X", "result": "Y" } ] }
c
Thanks, looks like it, I'll give this a try,
Hi, I gave it a try, unfortunately the issue persist Call ID: 440b3f6e-a9c6-4e0a-a82c-7b673b1eb946
h
I'm having issues with tools as well. My tool has async on response format is correct. My assistant acts like it got a response but just answers with an llm generated answer instead of the result given by the tool can't seem to fix it
u
Set async to false
h
im trying to get answers back from webhook response
tried it you are the goat
thanks
c
Thanks, I have noticed something after multiple tests, it works fine if the result doesn't contain any next lines/breaklines
This will work: { "results": [ { "toolCallId": "call_VaJOd8ZeZgWCEHDYomyCPfwN", "result": "San Francisco's weather today is 62°C, partly cloudy." } ] } This won't work: { "results": [ { "toolCallId": "call_VaJOd8ZeZgWCEHDYomyCPfwN", "result": "San Francisco's weather today is 62°C, partly cloudy." } ] }
u
Yup make sure to not add extra breaks or new lines as it will mess up the format and not send properly
2 Views