Skip to content

A RESTful API for a chat bot which analyzes user inputs and queries a database for relevant information

License

Notifications You must be signed in to change notification settings

Lincoln23/FastChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastChat

The logic behind a ChatBot which analyzes user inputs and queries a database

Built using:

Usage and Paramters

  • By default the service is hosted on port 8080
  • Acceptes Get requests
  • text - Required: The user input message
  • limit - Optional: limits the number of input returned
http://${your ip}:8080/${input}?limit=${int value}

Example

http://localhost:8080/who works in toronto?limit=20

Result

  • Response is in JSON
  • Response - There are two parts to the response
    • resultList - An JSON Array which contains all the information from the query
    • plainText - A simplified string that combines all the information from resultList into a sentence

Installation

  • Java 8
  • Import as a Maven Project
  • Create an AWS account and and create an Access/Secret Key
  • Launch an MySQL RDS instance
  • Launch an EC2 Ubuntu 16.04 instance

Put the apporiate values in {resources/application.properites}

spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
...

Setting up this application as a TOMCAT server

  • build your applicaiton as a .war file
  • Follow this guide to setup your server as a Tomcat server
  • In the application manager, run your .war file

** NOTE ** You will need to configure your own SQL database and will need to change Dao/AWS_RDS_dao to suit your needs. My database is setup as such: alt text

Testing

You can write your own Junit testing in src/test/java

TODO

  • Swtich to elastic search and OpenNLP

About

A RESTful API for a chat bot which analyzes user inputs and queries a database for relevant information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages