This repository contains code and data to build the dialog manager of the VIRA chatbot, addressing concerns surrounding COVID-19 vaccines.
conda create -n vira_env python=3.9
conda activate vira_env
pip install -r requirements.txt- Create a directory to store files needed to access the database:
mkdir resources/db- Place in it a
db_credentials.jsonfile and acertificate.crtfile. Thedb_credentials.jsonfile should contain the following keys: username (string), password (string), and endpoint (list of strings). You should obtain these details as well as thecertificate.crtfile from your MongoDB admin/setup.
The script to upload the content in resources to the db is db_utils.py.
To run it, first define the following environment variables:
BOT_WA_APIKEY: The API key of the translation serviceBOT_WA_URL: The url of the translation serviceBOT_DASHBOARD_CODE: The code required to access the evaluation dashboard (currently not active, can be left empty)BOT_KPA_HOST: The url of the KPA service in the evaluation dashboard (currently not active, can be left empty)BOT_KPA_APIKEY: The API key of the KPA service in the evaluation dashboard (currently not active, can be left empty)BOT_INTENT_CLASSIFIER_URL: The url of intent classifier (key-point matching) service of VIRABOT_DIALOG_ACT_CLASSIFIER_URL: The url of the dialog-act service of VIRA
Then run
python db_utils.py -conf-canned-db- Define an environment variable 'VIRA_API_KEY'
- Launch VIRA using
python main.py - Test VIRA with a simple user question using
python sanity.py
Build a docker image using:
docker build . -t vira-systemRunning the image requires two setup steps:
- Passing an environment variable VIRA_API_KEY
- Mounting the files
db_credentials.jsonandcertificate.crtto/app/resources/db/
Run the image using:
docker run -p 8000:8000 -it -e VIRA_API_KEY --mount type=bind,source=resources/db/db_credentials.json,target=/app/resources/db/db_credentials.json --mount type=bind,source=resources/db/certificate.crt,target=/app/resources/db/certificate.crt vira-system- Build the docker as shown above.
- Push the image to a docker registry of choice.
- Setup a deployment file in which
VIRA_API_KEYis defined and the files:db_credentials.jsonandcertificate.crtare mounted to/app/resources/db/ - Deploy the image on your platform using a link to the image on the docker registry.
If you would like to see the detailed LICENSE click here.