Git Product home page Git Product logo

chat-room-bot's Introduction

Forter Chat Bot

Hi there! :)

This is a little chat room with a bot that answers previously asked questions by indexing all questions to elasticsearch then analyzing incoming messages. The full challenge description can be found here

It is based on the following tech stack:

Getting started

  1. Clone the repository.
  2. Install elastic search locally:
    1. Create docker network:
      docker network create elastic
    2. Pull the image:
      docker pull docker.elastic.co/elasticsearch/elasticsearch:8.6.1
    3. Run the container without authentication:
      docker run --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node"  -e "xpack.security.enabled=false" -t docker.elastic.co/elasticsearch/elasticsearch:8.6.1
  3. Install the dependencies both on the server and client.
    1. Under the root folder, simply run:
      cd client 
      npm install
    2. Then,
      cd server
      npm install
  4. Start the development server.
    1. This command serves the app at http://localhost:8000:
      npm run serve
    2. The command will also start the express server at http://localhost:8001
    3. You can run the only server manually by using this command on the "server" directory
      npm run start:dev
  5. Profit!
chit.chat.app.mp4

Testing

To run the server side tests, simply run from the "server" directory:

npm run test

Some notes

  1. For each of access to elastic search, you can use the highly convenient Chrome extension Elasticsearch Head.
  2. The app logo was generated using DALL-E 2.0, a neural network trained on 400 million image pairs from the internet. You can read more about it here.
  3. The bot attitude was chosen to be more personal and friendly as according to various researches, it is more effective in increasing the user's engagement with the chatbot. You can read more about it here.
  4. The bot's answers were generated using ChatGPT, a large-scale generative pre-trained language model. You can read more about it here.
  5. The robot's welcoming voice was generated using UberDuck learnt from Jerry Seinfeld's voice.
  6. The avatars rely on 2 different APIs:
    1. DiceBear - A free API for generating unique avatar images.
    2. Boring Avatars - A free API for generating unique "boring" avatar images.
  7. The bot has peculiar humor, it likes dad jokes. Just ask him "bot tell me a joke" and you'll see...

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.