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.
- Nodejs
- Mongodb
- Start the mongoDB service.
- Create a "Chatbot" database.
- Import the json file in data folder to "tags" collection.
- Migrate to project directory in terminal/ command prompt
npm install
- In project directory, run the following command
node ./bin/www
- http://localhost:3000/ - Chat bot interactive UI
- 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>] }
- 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> }
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.
A simple UI developed with jade, HTML, CSS and javascript.