In this section, we will go through the process of creating a simple virtual assistant with two bots using Lex for both the bots and the dispatcher NLU.
The first step is to create two bots, each one with a specific job and different sets of intents.
In this example, we will use two lex bots configured with two different sets of intents.
To start creating VAs, there are two prerequisites:
To create a VA, you will need a VA definition saved in a JSON file or use portal’s virtual assistant create screen.
The VA is created by running sb-cli va create VA.json
or by navigating to Virtual Assisant
and clicking on the +Create Virtual Assistant
button. Once created, you will see it appear in the Virtual Assistants section of Portal and when running sb-cli va list
.
Lex
as the NLU engine typeOnce publishing is complete, you can use the quicktest button to test a few utterances and to test what bot it will be routed too.
A default endpoint is created when creating a VA. This is most easily visible on the resources section of portal. Click the test link on the resource card to try it out
Once created, the VA can be tested on lightning by clicking the test button near the bottom.
VAs are not supported in Lightning V1. When testing, make sure that Lightning V2 is being used.
From the image above, we can see the @SessionStart being triggered, sending a welcome message. Typing ‘help’ assigns the helper bot to answer any general questions. Typing ‘send money’ reassigns the bot to the transfer bot, beginning a monetary transfer.