Example of chatbot using Tock and open data APIs.
How to start
Two options available:
Use a complete docker installation
The setup is explained in the Tock docker project
Or run the code in the IDE
-
Start the docker-compose file for the NLP stack (explained here)
-
You will need a (free) SNCF Open Data key and a Messenger application (look at the Facebook documentation).
-
Set the right environment variables (see OpenDataConfiguration)
-
Also a secure ssl tunnel (for example ngrok) is required to test the bot directly on your desktop:
ngrok http 8080
-
Then run the fr.vsct.tock.bot.open.data.Start.kt class
-
Take the ngrok value (ie https://xxxx.ngrok.io ) and use it in the webhook interface of messenger settings, to specify :
- the url : https://xxxx.ngrok.io/messenger
- the verify token you set in tock_bot_open_data_webhook_verify_token env var