Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Code-base for the AI Project "*Conversational AI for Mensa food recommendations*"

Notifications You must be signed in to change notification settings

rngShard/tuk.mensa-kl-conv-ai

Repository files navigation

tuk.mensa-kl-conv-ai

Code-base for the AI Project "Conversational AI for Mensa food recommendations"

To use the Telegram-bot, add copy t.me/mensakl_bot into your browser window (when using the Telegram Web-App) or simply search globally for "MensaKL" or "mensakl_bot" as Telegram-contact.

Rasa

Retrieved from the Rasa docs.

Training Rasa

Train your dialogue-model with

python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue

and your nlu-model with

python -m rasa_nlu.train -c nlu_config.yml --data nlu.md -o models --fixed_model_name nlu --project current --verbose

Note that the bot.py class implements the training procedure. Running the bot without parameters trains both dialogue and nlu, while providing flags of ... --task train-[dialogue|nlu] train only the respective step.

Running Rasa

To run the rasa instance [with nlu understanding], use

python -m rasa_core.run -d models/dialogue [-u models/current/nlu] --endpoints endpoints.yml [--debug] [--enable_api]

with an ActionServer (python -m rasa_core_sdk.endpoint --actions actions) already running. The enable_api flag allows for http-request in the form of

curl -XPOST localhost:5005/conversations/default/respond -d '{"query":"hallo"}'

to access the Rasa instance.

Note: Not utilizing NLU requires input in form of [intent].

Deploying Rasa on Remote server

First generate a venv, install packages and prepare data.

# create venv and activate
virtualenv -p python3 venv
source venv/bin/activate

# install dependencies
pip install -r requirements.txt
python -m spacy download de

# copy private files
mkdir data
mkdir .cluster_data
# ... [do copying] ...

Then spin-up the recommender_server (internel recommender-data-cluster-API; --> :5000), the Rasa action server (for defined custom actions; --> :5055) and the Rasa instance (--> :5005).

cd src/rasa
python bot.py --task train-all

python src/recommender/recommender_server.py &
cd src/rasa
python -m rasa_core_sdk.endpoint --actions actions &
python -m rasa_core.run -d models/dialogue -u models/nlu/default/current/ --endpoints endpoints.yml --debug --enable_api &

About

Code-base for the AI Project "*Conversational AI for Mensa food recommendations*"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published