Tool Calling Issue
# support
b
Hey Vapi team, I've created a tool which calls the perplexity API through make. The tool works and gives me a result in make successfully: e.g. { "results": [ { "toolCallId": "toolu_bdrk_01XCeTDXqiH63n79cE33y8yb", "result": "The latest match between Manchester City and Arsenal ended in a 2-2 draw. Here are the key points: - Erling Haaland scored for Manchester City in the 9th minute. - Ricardo Calafiori equalized for Arsenal in the 22nd minute. - Gabriel Magalhães put Arsenal ahead in first-half injury time. - Arsenal was reduced to 10 men after Leandro Trossard was sent off just before halftime. - John Stones scored the equalizing" } ] } however, vapi doesn't seem to be using this information. How can this be? Any other time I've used tools and got a response the vapi model incorporates the response?
v
@bertiefa Hello there! It's great to hear that your tool is successfully calling the perplexity API and receiving results. If VAPI isn't incorporating the response from your tool into its operations, it could be due to a few reasons: 1. **Integration Issue**: There might be an issue with how the tool's response is being integrated into VAPI. Ensure that the response from your tool is being correctly passed back to VAPI in the expected JSON format. 2. **Configuration Error**: Double-check that the server URL and other configurations are set up correctly in VAPI to receive the tool's response. 3. **Processing Delay**: There could be a delay in processing the response. Verify that the response is being received and processed in a timely manner. 4. **Data Handling**: Make sure that VAPI is programmed to handle the data structure of the response. The response should be in a format that VAPI can understand and use. If you've checked these aspects and the issue persists, it might be helpful to provide more details about how you're expecting VAPI to use the information and any specific configurations you've set up for the tool integration. This way, I can assist you more effectively. If you need further assistance with troubleshooting, please provide additional context or error messages you're encountering, and I'll do my best to help you resolve the issue.
You can continue this conversation by mentioning me in the message.
b
The response is definitely in the correct format because It's the same format as other tools I use which I know work. The server URL is correct otherwise how would I get this result in the first place in make. If there's a delay how do I make sure VAPI uses the information or waits? It's already set to not be async?
no worries figured out the issue. Vapi reqires the result to not be longer than a short paragraph it seems
t
Vapi doesn't like any return to the line in the result element.. it always breaks the the response, and you get no result .. just take the n\ from your input data and it should work .. I always make sure the tools return simple text with no formatting or return to the line.
7 Views