Home

Awesome

<p align="center"> <img src="https://puu.sh/GTori/c6f7e9cae8.jpg"> <h1 align="center"> Botty, a basic conversational bot using socket.io and nodeJS.</h1> </p>

Ā  Ā 

Table of Contents šŸ“

Ā 

Talking to Botty šŸ’¬

Botty is built on top of socket.io by default, meaning you should use a client implementation of this to talk to it.

In JavaScript we can simply do something like:

import io from 'socket.io-client';

const socket = io(
  'https://botty.alexgurr.com',
  { transports: ['websocket', 'polling', 'flashsocket'] }
);

socket.on('bot-message', (message) => {
  // do something
});

Botty is simple and cleanly written. This makes it easy to swap out socket.io for a general web socket or REST solution for example.

Ā 

Configuring Botty šŸ”§

Botty has an easy-to-change constants file, called constants.js in the root of the server. Here's what you can change:

General

General configuration

Interaction

Things to make Botty seem more real

Ā 

Extending Botty's Responses āœļø

Botty has a default dataset file called response_dataset.csv. This is easily extendable, or you can provide your own. If you want to bring your own file, simple change the value of the RESPONSES_FILE_PATH constant and make sure it's in the correct format (see constants above).

Feel free to open a pull request to extend the default file.

Ā 

Running Botty Locally šŸš€

yarn

# Botty will be available through socket.io on the port defined through the PORT constant
yarn start

Ā 

Botty in the ā˜ļø

Botty is currently hosted and waiting to chat to your app at https://botty.alexgurr.com/. The server isn't free - if you'd like to help out you could <a href="https://www.buymeacoffee.com/alexgurr" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="30" width="130"></a>

Botty is currently actively used in the Chatter ReactJS Coding Challenge.