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.json
file and acertificate.crt
file. Thedb_credentials.json
file should contain the following keys: username (string), password (string), and endpoint (list of strings). You should obtain these details as well as thecertificate.crt
file 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-system
Running the image requires two setup steps:
- Passing an environment variable VIRA_API_KEY
- Mounting the files
db_credentials.json
andcertificate.crt
to/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_KEY
is defined and the files:db_credentials.json
andcertificate.crt
are 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.