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.
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.
Models are part of repo and must be stored in models/
directory named model.tar.gz
suffix.
bash train_model.sh
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
- Run script to create directory for Postgres database and pull all necessary images and next override rasa-sk image
bash prepare_env.sh
- 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=
- 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
- Run stack named "barfobot":
docker stack deploy -c docker-compose.yml barfobot
On screen should appear a message that four services was created.
- Stop current stack
docker stack rm barfobot
- Run deploy script
docker stack deploy -c docker-compose.yml barfobot