How to Make an Agent Handle Tool-Calling Failure R...
# support
f
Hi, I'm trying to use tool-calling functionality to book meetings. It works fine for booking meetings and offering alternative slots if the selected slot is not available. However, I can't make the agent offer those slots, even though they are returned back to Vapi. I tried to describe this within the prompt, saying something like, "If you can't book the meeting, use the response and offer two other slots," but it didn't work. Has anyone found a solution to this? (I was using function calling yesterday, and it was booking or offering free slots just fine. I decided to use tools to set async: false today because the agent was not waiting for the confirmation.)
v
message has been deleted
You can continue this conversation by mentioning me in the message.
@fazil I'm glad to hear that you've been able to book meetings and offer alternative slots using VAPI. It sounds like you're looking for a way to ensure that the agent offers alternative time slots when the preferred slot isn't available, and that you've switched to using tools with
async: false
to make the agent wait for confirmation. To address your issue, it's important to ensure that the logic for offering alternative slots is correctly implemented in your tool-calling functionality. When the preferred slot is not available, the response from VAPI should include the alternative slots, and your agent should be programmed to parse this response and present the options to the user. If you're still experiencing difficulties, please provide more details about how you're currently handling the response when a slot isn't available, and I can assist you further. If there's a specific function or tool you're using to offer alternative slots, please let me know so I can guide you on how to use it effectively. Remember, if you need to call a function or use a tool to offer alternative slots, I'm here to help you with that process. Just provide me with the necessary parameters, and I'll assist you in making the call. If there's something that's not clear or not working as expected, please ask support for more info on this.
f
I've resolved this by changing the tool name to "book or suggest alternative slots" from "try to book meetings" and adding more descriptions. Being very very clear about the tool naming is the key in my experience. Thanks anyways!
s
Okay.
4 Views