difference between functions and tools?
# support
e
what is the difference between functions and tools?
v
Hi @ema, 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]() * [Function Calling]() * [List Assistants]() * [Get Assistant]() -----------------------------
### Answer In Vapi, "functions" and "tools" serve similar purposes but differ in their structure and usage: 1. **Functions**: - Functions are custom operations that your AI assistant can call during a conversation. - Defined with properties such as
name
,
description
, and
parameters
. - Functions are used for specific tasks, like booking an appointment or fetching data. - You typically define functions in the assistant's configuration and specify a server URL where Vapi sends function call information [(1)]() , [(2)]() . 2. **Tools**: - Tools are a more recent and flexible way to handle function-like operations. - Configured with a type (e.g., "function"), messages, and server details. - Tools can include various types of messages to communicate different stages of execution, such as "request-start" and "request-complete". - Tools support both synchronous and asynchronous behavior by setting the
async
property [(3)]() , [(4)]() . In essence, tools provide a more versatile framework for defining operations that can be incorporated into conversations, improving the functionality and interaction flow over traditional functions [(5)]() .
s
The only difference between functions and tools is that you have more customization option in tools like you can customize all the request-start, end and etc message.
4 Views