Amazon Lex – Build Conversation Bots
Conversational interfaces for your applications powered by the same deep learning technologies as Alexa.
Amazon Lex is a service for building conversational interfaces into any application using voice and text. Amazon Lex provides the advanced deep learning functionalities of automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text, to enable you to build applications with highly engaging user experiences and lifelike conversational interactions. With Amazon Lex, the same deep learning technologies that power Amazon Alexa are now available to any developer, enabling you to quickly and easily build sophisticated, natural language, conversational bots (“chatbots”).
Setup:
Sign-up for an AWS account and setup the AWS Lex service/application.
Grab the AWS_access_key and AWS_secret_key - you will need these details to complete configuration of this integration
Login or Register to Admin Portal
Select Functions
Select your desired App and Keyset
Select "Explore Templates" and proceed with selected integration.
Assign the module and keyset under which the integration should run
Update the Integration code to set the following variables:
const AWS_REGION = 'YOUR_LEX_REGION'; // set to your region
const BOT_ALIAS = 'YOUR_LEX_BOT_ALIAS'; // set to bot alias
const BOT_NAME = 'YOUR_LEX_BOT_NAME'; // set to bot name
Review the code and if it looks ok - start the function
Try a test message (you can click on
Publish
to do this).
Walkthrough:
This Integration is setup to listen to a specific PubNub channel (CHANNEL-to-send-to-LEX
) but you can configure it to listen to all channels or a subset, using wildcards, e.g. chat.*
. Thus, you can route message data sent through PubNub over to an Amazon Lex application for cross chat room bot integration, for example. The bot response will be published back on to the channel of the incoming message.