Name: aws-ai-qna-bot
Owner: Amazon Web Services - Labs
Owner: AWS Samples
Description: Code samples related to "Creating a Question and Answer Bot with Amazon Lex and Amazon Alexa", published on the AWS AI Blog. QnABot (pronounced ?Q and A Bot?), uses Amazon Lex and Amazon Alexa to provide a conversational interface to your ?Questions and Answers?, so users can just ask their questions and get quick and relevant answers.
Created: 2017-08-10 19:49:01.0
Updated: 2018-01-14 16:07:31.0
Pushed: 2018-01-14 05:43:30.0
Size: 1439
Language: CSS
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Build a chat bot to answer questions.
This repository contains code for the QnABot, described in the AWS AI blog post ?Creating a Question and Answer Bot with Amazon Lex and Amazon Alexa?. To launch the QnABot follow the instructions in the blog post.
To customize the QnABot use the following instructions to set up a local dev environment.
Note: Lex is currently only supported in the us-east-1 region.
First, install all prerequisites:
install
Next, use the following command to launch a CloudFormation template to create the S3 bucket to be used for lambda code and CloudFormation templates. Wait for this template to complete (you can watch progress from the AWS CloudFormation console)
run stack dev/bootstrap up
After the template has launched, use the following command to build all assets and upload to the S3 bucket created in the previous step:
run upload
Finally, use the following command to launch template to deploy the QnA bot in your AWS account. When the stack has completed you will be able to log into the Designer UI (The URL is an output of the template) with the password set in “templates/test/master.json”:
run stack test/master up
All script descriptions are found in /docs/scripts.md
The templates are found in the /templates directory. The template master-base.json is the entry point and the other templates are nested in master-base.json.
Lambda functions are found in the /lambda directory.
The Designer UI and client UI code is in the /website/admin directory.
Answers to questions may include links to other websites. To efficiently support URLs as part of an answer, Markdown syntax should be used to represent these links. For example, a reference to www.amazon.com should be formatted as [Amazon](http://www.amazon.com). http, https, and ftp are supported protocols.
The following will launch a CloudFormation template to create AWS resources in your account that are used in the Lambda, CloudFormation, and WebUI tests.
run dev-up
Once the template has completed you can run the tests in the following sections.
The CloudFormation test templates are in the templates/test folder. Run a template test with:
run stack test/{template-name}
For example, if you want to launch a template with filename “es.json” run the following command:
run check test/es
You also can check a template's syntax with:
run check {template's directory relative to /templates}/{template-name}
Each lambda directory has its own tests that can be run by executing the following command in that directory:
run test
The Test for the website are in the /website/admin/test. A development server can be setup by calling:
run server
You can view this local Designer UI at http://localhost:8000
Currently the only browsers supported are:
Chrome
FireFox
We are currently working on adding Microsoft Edge support.
See the LICENSE.md file for details