After weeks of tinkering, I finally managed to set up an AI bot, similar to discobot but one that learns and is more responsive. Here is how I did it for anyone interested in setting it up. There is quite a few steps, but once you get it all set up, the result is amazing.
Install the hubot plugin for discourse Hubot Adapter for Discourse, to install hubot on your discourse, the hubot variables like HUBOT_DISCOURSE_USERNAME are entered into (yourhubotfolder)/bin/hubot file, just nano or edit it to write export HUBOT_DISCOURSE_USERNAME=mybot) For more details go here Discobot for training
Sign up and make a new bot on https://dialogflow.com/
Install a hubot / apiai (dialogueflow) adapter from here: GitHub - ojacques/hubot-apiai: Add smartness and conversational UX to Hubot with API.AI as back-end 3a. in the bin/hubot file, make sure you have the following variables set
export HUBOT_DISCOURSE_USERNAME=(bot’s username, don’t do discobot)
export HUBOT_DISCOURSE_KEY=(your bot-user’s api key, not the site api)
export HUBOT_DISCOURSE_SERVER=(discourse url)
export API_AI_CLIENT_ACCESS_TOKEN=(dialogflow bot server api, found in the settings)
You will have to download a google application credential json, which you can get following this guide: https://cloud.google.com/genomics/downloading-credentials-for-api-access
Now boot up your hubot by typing
bin/hubot -a discourse-adapterto run it. If you want it to run even when you are not in the terminal, type
nohup bin/hubot -a discourse-adapter &
Private message the bot for testing. If you set up the dialogflow bot with small talk, you can say hi, how are you and engage in small talk right away. Other dialogue you have to set up. There are a few tutorials on youtube that are a good start. https://youtu.be/HqfN9qjNj9A
Here is a demo
If you have any questions, feel free to ask.
Also, a proper thank you to @codinghorror and the team for developing discourse, and @awole20 for developing the hubot plugin, couldn’t have done it without you!