Code Monkey home page Code Monkey logo

malaka / aws-ai-qna-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-solutions/qnabot-on-aws

0.0 2.0 0.0 949 KB

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.

License: Other

Makefile 0.52% Shell 0.94% JavaScript 31.84% CSS 58.53% HTML 0.20% Vue 7.97%

aws-ai-qna-bot's Introduction

A Question and Answer Bot Using Amazon Lex and Amazon Alexa

Build a chat bot to answer questions.

Overview

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.

Prerequisites

  • Run Linux. (tested on Amazon Linux)
  • Install npm >3 and node >6. (instructions)
  • Clone this repo.
  • Set up an AWS account. (instructions)
  • Configure AWS CLI and local credentials. (instructions)

Note: Lex is currently only supported in the us-east-1 region.

Getting Started

Fiuit, install all prerequisites:

npm 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)

npm 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:

npm 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":

npm run stack test/master up

All script descriptions are found in /docs/scripts.md

Components

CloudFormation Templates

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

Lambda functions are found in the /lambda directory.

Web interface

The Designer UI and client UI code is in the /website/admin directory.

Running Tests

The following will launch a CloudFormation template to create AWS resources in your account that are used in the Lambda, CloudFormation, and WebUI tests.

npm run dev-up

Once the template has completed you can run the tests in the following sections.

CloudFormation tests

The CloudFormation test templates are in the templates/test folder. Run a template test with:

npm run stack test/{template-name}

For example, if you want to launch a template with filename "es.json" run the following command:

npm run check test/es

You also can check a template's syntax with:

npm run check {template's directory relative to /templates}/{template-name}

Running Lambda Function tests

Each lambda directory has its own tests that can be run by executing the following command in that directory:

npm run test

Testing Designer UI

The Test for the website are in the /website/admin/test. A development server can be setup by calling:

npm run server

You can view this local Designer UI at http://localhost:8000

Built With

License

See the LICENSE.md file for details

aws-ai-qna-bot's People

Contributors

johncalhoun avatar

Watchers

James Cloos avatar Malaka Ekanayake avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.