Skip to content

Naveen0903/Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot application - Uses database, that contains some pre-defined set of questions and answers. - Uses fuzzy logic for unknown questions. - In case, if the query doesn't find any suitable solution, made by the client. A contact mail is returned.

Requirements

  1. Nodejs
  2. Mongodb

Configuration

  1. Start the mongoDB service.
  2. Create a "Chatbot" database.
  3. Import the json file in data folder to "tags" collection.

Installation

  1. Migrate to project directory in terminal/ command prompt

    npm install

  2. In project directory, run the following command

    node ./bin/www

URLs

  1. http://localhost:3000/ - Chat bot interactive UI
  2. http://localhost:3000/api/chat - api call to query question Request method: GET Request format: { q: } Response format: { id: , q: , a: , tags: [<list_of_relative_words>] }
  3. http://localhost:3000/spi/messages Request method: GET Request format: { id: <client_id>, messages: [<array_of_messages>] } Response format{ id: < 0 in case of existing client else new client id> }

BACKEND

Path: <PROJECT_PATH>/lib Description: - All backend configuration are in lib diretory. - Config file contains all the required uri path and constants. - Chat file stores all the logic required to process incoming request. - routes file has all the defination to route to specific file that contains the request processing methods.

FRONTEND

A simple UI developed with jade, HTML, CSS and javascript.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published