GithubHelp home page GithubHelp logo

albert-91 / barf-o-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 326.15 MB

Polish BARF specialist chatbot based on Rasa framework.

Home Page: https://www.messenger.com/t/105119554259120

License: MIT License

Dockerfile 0.38% Python 98.49% Shell 1.14%
barf chatbot rasa rasa-chatbot barf-obot polish-chatbot barfobot barf-o-bot

barf-o-bot's Introduction

BARF-o-bot

This repo contains the BARF-o-bot sources based on Rasa framework. BARF-o-bot is a specialist in BARF dogs diet based on raw meat. Currently his abilities are:

  • calculating of products to buy, where input of this calculation is amount of meat,
  • calculating distribution of ingredients to make a portions,
  • getting weather data from Weatherstack API
  • smalltalk.

Chatbot's training data and responses are only in polish language.

If you want to try it then go to Messenger.

Procedures

For all credentials both for production and for development is used special file .env which is not tracked in repo. There are environment variables used in files like docker-compose.yml, credentials.yml and some actions.

Training a model

Models are part of repo and must be stored in models/ directory named model.tar.gz suffix.

Training model command (model will be generated as models/model.tar.gz):

bash train_model.sh

Deployment

Firstly make your node as a swarm manager by command:

docker swarm init

To deploy:

  • BARF-o-bot service
  • Custom action server
  • Duckling service
  • Postgres service
  1. Run script to create directory for Postgres database and pull all necessary images and next override rasa-sk image
    bash prepare_env.sh
  2. Fill in all credentials in .env file with all names of environments variables the same as below WITHOUT quotation marks:
    FACEBOOK_VERIFY=
    FACEBOOK_SECRET=
    FACEBOOK_PAGE_ACCESS_TOKEN=
    POSTGRES_DB=
    POSTGRES_USER=
    POSTGRES_PASSWORD=
    WEATHERSTACK_API_KEY=
  3. Set Messenger Profile features like "Get Started" button, "Ice Breakers", "Greeting" and "Persistent Menu", setting content of these features in config/settings.py and enter command:
    python3 -m scripts.messenger_profile
  4. Run stack named "barfobot":
    docker stack deploy -c docker-compose.yml barfobot

On screen should appear a message that four services was created.

Deploy new version (update a chatbot with trained model via Docker on production)

  1. Stop current stack
    docker stack rm barfobot
  2. Run deploy script
    docker stack deploy -c docker-compose.yml barfobot

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.