Vapi tries to call custom openai tools with http r...
# support
j
I am using custom llm and here is example tool I defined: "tools": [ { "type": "function", "function": { "name": "transfer_to_hr_department", "description": "Use this tool for following matters: Can you transfer me to HR department?" } }, ] So when ask agent to call this tool, it says one moment and vapi tries to call api (which I havent defined, because this tool is not http based) to call this tool. Then it just adds tool_result: "No response returned." message itself. But I want to return tool_response in my own code. What's wrong with it? Can I disable vapi sending http request to unknown url to get result of. tool?
v
message has been deleted
@Javokhir It seems like there might be a misunderstanding about how VAPI works with custom tools. VAPI is designed to interact with your server via HTTP requests to call the tools you've defined. If you have a tool that is not HTTP-based and you want to handle the response within your own code, you would need to set up your server to receive the HTTP request from VAPI and then handle the logic internally before sending back the response. If you want to prevent VAPI from sending an HTTP request to an undefined URL, you should ensure that your server URL is configured correctly to handle requests for the
transfer_to_hr_department
tool. If you haven't defined an endpoint for this tool, VAPI might not know where to send the request, resulting in the "No response returned." message. To resolve this, you should: 1. Define an endpoint on your server that corresponds to the
transfer_to_hr_department
tool. 2. Make sure that your server is properly configured to handle requests to this endpoint. 3. When VAPI sends a request to this endpoint, your server should process the request and return a response in the expected JSON format. If you have already set up your server correctly and are still facing issues, please provide more details or 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.