Function Calling

What is Function Calling?

Function calling allows your assistant to execute specific operations by invoking external functions. These functions can perform tasks such as retrieving information, updating data, or executing business logic based on user requests.


What happens when a function needs to be called

What happens when a function needs to be called




Creating Your Own Functions

First open the function calling page as shown below

Then click on the ''create'' button

You can create custom functions for your assistant by providing:

  1. Function Definition: A JSON object that describes the role of the function and specifies the required fields (e.g., parameters and their expected types).
  2. Function Logic: The JavaScript (Node.js) code that will be executed when the function is called.

Note: You can learn more about our Node.js environment here.


Attaching Functions to Your Assistant

Once you’ve created your function, attach it to your assistant. The function will be invoked automatically whenever the assistant determines it’s needed based on user inputs. This integration ensures seamless and dynamic handling of user requests.