xenial-black
xenial-black16mo ago

Hi guys, basically I am calling from a server, how can I activate the tools - functions?

No description
6 Replies
Ask Inkeep
Ask Inkeep16mo ago
Hi @John_Rodriguez_0906, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Tools Calling * Server Events * Function Calling * Get Call -----------------------------
Ask Inkeep
Ask Inkeep16mo ago
Answer To activate and configure tools functions from your server when using Vapi, you will need to set up a "function" type tool within your Vapi assistant’s configuration. Here's a basic outline on how to do this: 1. Define the Tool Configuration: Specify the type of tool, the server where the function is hosted, and other details such as whether the function call should be synchronous or asynchronous.
{
"type": "function",
"messages": [
{
"type": "request-start",
"content": "Processing your request..."
},
{
"type": "request-complete",
"content": "Function executed successfully!"
}
],
"function": {
"name": "your_function_name",
"parameters": {},
"description": "A brief description of what the function does"
},
"async": false,
"server": {
"url": "https://your-server.com/your-function-endpoint"
}
}
{
"type": "function",
"messages": [
{
"type": "request-start",
"content": "Processing your request..."
},
{
"type": "request-complete",
"content": "Function executed successfully!"
}
],
"function": {
"name": "your_function_name",
"parameters": {},
"description": "A brief description of what the function does"
},
"async": false,
"server": {
"url": "https://your-server.com/your-function-endpoint"
}
}
(1) , (2) 2. Customize the Tool Messages: Edit the messages array to tailor the communication flow as per your needs, adding or removing messages to reflect the stages of function execution. 3. Set Server URL: Ensure that the server URL accurately points to your hosted function endpoint. 4. Adapt to Your Needs: Adjust the function details such as name and parameters based on the specific requirements of your server’s function. For a more detailed setup and examples, you may refer to the Tools Calling section in the Vapi documentation Tools Calling (1) , (2) .
stormy-gold
stormy-gold16mo ago
Can you be more specific and tell me what is the issue that you are facing?
xenial-black
xenial-blackOP16mo ago
sure sahil, I have an app running on port 3000 to call clients through the api using an x command - example: bun run call:people passing a few list of numbers but when I call the clients through the console, although the call is made, the tools are not called, they are called very occasionally let me put some code snippets here
No description
No description
No description
No description
Ask Inkeep
Ask Inkeep16mo ago
Got it. Tagging @Vapi Team for additional help.
stormy-gold
stormy-gold16mo ago
Can you send me one call_id? Marking it as complete as there is no follow up.

Did you find this page helpful?