Publish The Lex Chat Bot
Now that we have a working bot, we can publish it so it can be called by our TravelBuddy web page.
- In the Lex console, click Bot verion on the left menu
- Click Create version.
- Click Create
- Now you see a new version created
- Next, we will create prod alias. Click Aliases on the left menu
- Click Create alias.
- Enter prod for alias name
- In Associate with a version section, select the instance you just created.
- Scroll down to bottom and click Create
- Click to the English (US).
- Select TripSearchLexBot for Source, select $LATEST version.
- Click Save
The familiar TravelBuddy website should render in your browser. As before, you should see the Hotel Specials and Flight Specials listings rendered on the page, and the Find trips to… search option is also available. There is also the new Chat with us! option. Click the button and the chat bot window will appear:
- Type in your query - for example:
I want to fly from Sydney to Melbourne
- The bot will respond When do you want to fly? Type
Tomorrow
- The bot will respond Are you sure you want to find flights to Melbourne? Type
Yes
.
- The bot will respond I have 1 flight from Melbourne to Sydney - 1 January 2018 a similar message - perhaps there is more than one flight available, and perhaps the date is different - populating the DynamoDB table is randomised.
Log into your account before making a chat.