Here is a ready to use JAICF bot template written in Kotlin that utilises a Rasa NLU service and can be deployed to Heroku cloud with a single click. You can use this project as a templated JAICF-based project with Rasa NLU engine.
You can deploy this template right on Heroku cloud and then modify and debug it locally on your PC.
Once this project utilises a Rasa NLU, you have firstly to deploy a Rasa server to the Heroku cloud. Here is a ready to use template, that can be deployed to Heroku with a single click.
Once deployed, copy the server's URL for the next step.
This project is a Telegram chatbot, thus you have to create a Telegram bot and obtain it's token.
JAICF is a multi-platform framework, thus this project can be connected to any channel, not only a Telegram.
Once you've deployed Rasa NLU and created Telegram bot, you can deploy this project to Heroku cloud. Just click on the button below.
Once deployed, go to Resources tab and enable worker Dyno to start a Telegram connector.
Now you can open chat with your Telegram bot via preferred Telegram client.
Please make the next steps to upload your changes on Heroku.
Install git and Heroku CLI. Run a terminal (or console) on your machine and type
heroku login
heroku git:clone -a <your Heroku application name>
cd <your Heroku application name>
git remote add origin https://github.com/just-ai/jaicf-rasa-template
git pull origin master
You have to do these steps only once.
Once you are ready to upload your changes to Heroku, just type
git add .
git commit -am "some comments"
git push
Heroku will build and deploy your changes automatically.
Import this project in IntelliJ IDEA and run Telegram.kt
file to test your changes in Telegram.
Make sure you've provided your Telegram token in TELEGRAM_TOKEN
environment variable.
You have also to run your Rasa NLU server locally.
Just use rasa train
and rasa run --enable-api
commands in your terminal.
You can also use Docker. Just make changes in NLU model and then docker build -t rasa .
and docker run rasa
commands.
You can make changes of NLU model independently from the changes of this code. Please refer to the Rasa template to learn how you can upload your NLU model changes.