Giter VIP home page Giter VIP logo

chatbot's Introduction

Build Your Own Chatbot using Java

This repository explains how to create a Star Wars chatbot using Amazon Lex and Java.

logo

The users can interact with this chatbot using the following means:

  1. Voice (Alexa, Phone/Call)

  2. Text (Phone/SMS, Facebook Messenger, Slack)

Here are the key components of architecture:

architecture

Deploy Lex bot and Alexa backend function using Java

You need to install org.sample.aws.lex:lex-java:0.2 dependency as explained at https://github.com/arun-gupta/lex-java#install-jar-locally before building this project.

mvn -f starwars-chatbot/pom.xml clean package install

ARN for Alexa function: aws lambda get-function --function-name StarWarsChatbot --region us-east-1 | jq .Configuration.FunctionArn

Note
Getting Started with Alexa skill using Java is explained at https://github.com/arun-gupta/alexa-skill-java.

JSON Document

Data is loaded as JSON documents in DynamoDB. Here is a sample JSON document:

{
  "dead": true,
  "force-sensitive": true,
  "force-side": "light",
  "id": 1,
  "lightsaber": "green",
  "planet": "Dagobah",
  "quotes": [
    "When nine hundred years old you reach, look as good you will not.",
    "Truly wonderful, the mind of a child is",
    "A Jedi uses the Force for knowledge and defense, never for attack",
    "That is why you fail.",
    "Adventure. Excitement. A Jedi craves not these things.",
    "Judge me by my size, do you?",
    "Fear is the path to the dark side",
    "Wars not make one great",
    "Do, or do not. There is no try",
    "Size matters not",
    "The dark side clouds everything",
    "Impossible to see the future is",
    "Clear your mind must be",
    "Much to learn you still have ... my old padawan"
  ],
  "weapon": "lightsaber",
  "whoami": "Yoda"
}

Create Global Secondary Index on whoami

Different platforms

Twilio/SMS

  1. Send a message to 408-913-9827 as shown below:

sms

Alexa

  1. Test using http://echosim.io or Alexa

Web

TODO

Mobile

TODO

Logging using Amazon CloudWatch

Monitoring using AWS X-Ray

TODO

How to talk to the chatbot?

Use phrase Ask Star Wars for Alexa, otherwise just the text as is. The list of questions is at https://github.com/arun-gupta/chatbot/wiki/Typical-Questions.

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.