Invoke Function
Guide to invoking functions within the knowledge base of your voice assistant
Using functions, you can enhance the Knowledge Base of your voice assistant by including custom functionalities. Here’s how you can invoke a function in the knowledge base:
Introduction
Now that we’ve ensured our function works, we want to get our voice assistant to use it. Navigate to the knowledge base and start writing your instructions.
Adding a Function
You can add a function into the knowledge base in three ways:
- Type ”/” in the card’s “Actions” field
- Right-click in the card’s “Actions” field
- Click the + icon on the right side of the field
All of these methods will bring up the function context menu where you can search through all your assistant functions and select the one you want. From this menu, you can also create a function in context and populate its definition later.
You can use a function as many times as you like to cover all the use cases you want your voice assistant to handle.
It may require some iterative testing to get your voice assistant to call your function and behave as expected.
The example below has been found to work in many cases, but you will likely find better ways of constructing your conversation through trial and error.
Testing your assistant
- Save your assistant
- Click the Play button in the top right-hand corner of the header to reveal the test chat panel.
- Ask “Where is my order?”
- Watch as your assistant responds with the location in natural language.
Remember, we passed a the JSON location object as a string to the LLM.
- Check Function Calls
- You can check if your voice assistant called a function and with what parameters by clicking on the settings button next to the close button in the test panel and enabling the functions toggle.
By following these steps, you can successfully invoke functions in the knowledge base of your voice assistant.
For any questions or further assistance, please refer to our Support Page or contact our support team.