Giter Site home page Giter Site logo

geico-hackathon-2's Introduction

GEICObot

Judges: We've been made aware that we forgot to include run/testing instructions for GEICObot. We're updating the README to explain the process a little better:

Notes for Judges

This is a standard Kotlin/JVM project using gradle. The application entrypoint is located at src/main/kotlin/com/adamratzman/geicobot/GeicoBot.kt.

The src directory structure is consistent with the application design.

User chat -> Bot.kt chat endpoint -> CommandFactory -> Lex -> CommandFactory -> Command invocation

This means that user input is put through Lex. If one of our Lex command intents matches the input, we return lex.COMMAND_ID ARGS?, which is then mapped to a registered Command. The command's executeBase command is called and a callback provided for any return value. If no Lex intent is found, we return lex.notfound. This results in being matched to ScraperCommand, where we call the Cleverbot API for one of its conversational responses and return the response text.

As such, all http endpoints are located in com.adamratzman.geicobot.http.

Commands are located in com.adamratzman.geicobot.commands (design is also easily extensible)

Db integration is located in com.adamratzman.geicobot.db, and also in GeicoBot.kt.

Chat tools and utilities reside in com.adamratzman.geicobot.chat

See Handlebars and Sparkjava documentation if you are unfamiliar with Handlebars as a templating engine or Spark as a jetty-based web server.

See build.gradle for our plugins, jar packaging steps, and dependencies.

To test, please consult the "Testing non-locally" section below. You may use the account we provide in that section, which already contains a friends list, an existing chatlog, and favorites.

Testing

Non-locally

We have a hosted instance of GEICObot here that you can use. Please use the following test account that we created for the purposes of this hackathon (will be deleted on Tuesday):

u: adamratzman1 | p: geicohackathon

Locally

It takes a lot of work to get an application of this scale running locally, and it's not free either, due to AWS/cleverbot. That's why we provide a hosted instance and account for you to use.

However, we recognize that it may be important for you to test this application locally. You will need a valid cleverbot api key and aws account with permissions to call the Lex service.

Please follow these steps in order.

  1. Make sure docker is installed on your system and that you are an administrator on your system.
  2. Make sure your ~/.aws/config file looks like this:
[default]
region = us-east-1
output = text
  1. sh start-rethinkdb.sh to start the rethinkdb server.
  2. java -jar ./build/libs/geico-hackathon-2-1.0-SNAPSHOT.jar CLEVERBOT_KEY AWS_PUBLIC_KEY AWS_SECRET_KEY
  3. Navigate to http://localhost:8080

geico-hackathon-2's People

Contributors

adamint avatar aicmille avatar khalea avatar tc-ham avatar

Watchers

 avatar  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.