Nach wochenlangem Experimentieren habe ich es endlich geschafft, einen KI-Bot einzurichten, der Discobot ähnelt, aber lernt und reaktionsschneller ist. Hier ist, wie ich es gemacht habe, falls Sie interessiert sind, ihn einzurichten. Es gibt einige Schritte, aber sobald alles eingerichtet ist, ist das Ergebnis beeindruckend.
Installieren Sie das Hubot-Plugin für Discourse unter Hubot Adapter for Discourse. Um Hubot auf Ihrem Discourse-Server zu installieren, werden die Hubot-Variablen wie HUBOT_DISCOURSE_USERNAME in die Datei (IhrerHubotOrdner)/bin/hubot eingegeben. Öffnen Sie diese einfach mit nano oder einem anderen Editor und fügen Sie folgendes hinzu: export HUBOT_DISCOURSE_USERNAME=mybot. Weitere Details finden Sie hier: Discobot for training - #10 by featheredtoast
export HUBOT_DISCOURSE_USERNAME=(Benutzername des Bots, nicht discobot verwenden)
export HUBOT_DISCOURSE_KEY=(API-Schlüssel Ihres Bot-Benutzers, nicht der Site-API-Schlüssel)
export HUBOT_DISCOURSE_SERVER=(Discourse-URL)
export API_AI_CLIENT_ACCESS_TOKEN=(Dialogflow-Bot-Server-API, in den Einstellungen zu finden)
export GOOGLE_APPLICATION_CREDENTIALS=(IhrJson).json
export DIALOGFLOW_PROJECT_ID=(NameDesProjekts)
Starten Sie Ihren Hubot jetzt, indem Sie bin/hubot -a discourse-adapter eingeben, um ihn auszuführen. Wenn Sie möchten, dass er auch läuft, wenn Sie nicht im Terminal sind, geben Sie nohup bin/hubot -a discourse-adapter & ein.
Senden Sie dem Bot eine private Nachricht zum Testen. Wenn Sie den Dialogflow-Bot mit Small Talk eingerichtet haben, können Sie sofort „Hallo", „Wie geht es dir?" sagen und Small Talk führen. Für andere Dialoge müssen Sie diese selbst einrichten. Es gibt einige Tutorials auf YouTube, die einen guten Start bieten: https://youtu.be/HqfN9qjNj9A
Wenn Sie Fragen haben, zögern Sie nicht, diese zu stellen.
Außerdem ein großes Dankeschön an @codinghorror und das Team für die Entwicklung von Discourse sowie an @awole20 für die Entwicklung des Hubot-Plugins. Ohne euch wäre es nicht möglich gewesen!
This is just plain awesome! I am not too experienced with this myself, but do you know if this would work to deploy on Heroku or not? Thanks for the tutorial!
@awole20@Timothy_Vail I know I sound absolutely hilarious by saying this, but is there any way to make a bot that you guys know of without being an admin (a.k.a having an api key)?
I am slowly working my way through this. What threw me at the first stage was access errors when running yo hubot --adapter=discourse-adapter per the installation instructions for the plugin. It looks like you have to change the permission for the folders. Fix is documented here.
So, as I discussed above, I hit an error installing NPM. Error was using root when installing, a common gotcha that leads to a lot of EACCES and permission errors. This is a well-documented error. I believe a lot of people are on Digital Ocean. Follow their documentation for correctly setting up NPM on your droplet.
Thanks for sharing this, Tim. I’m curious to know what types of dialogue you’ve set up for the chatbot. How are your forum users engaging with it in the real world?
It’s actually been awhile since I’ve used the chatbot, but am planning on using it again for an upcoming project. Mostly it was used for training sessions for teachers, they would go through a course using chatbot and learn about teaching through the dialogue. Let me know if you have any questions.
Bevor ich dies auf meinem Discourse implementiere (und da ich nur einigermaßen gut darin bin, Anweisungen zu befolgen ), funktionieren diese Anweisungen in diesem Thread noch? Oder… gibt es eine aktuellere oder bevorzugte Methode, einen KI-Bot zu integrieren?