بعد أسابيع من التجريب، تمكنت أخيراً من إعداد روبوت ذكاء اصطناعي، يشبه discobot لكنه قادر على التعلم وأكثر استجابة. إليك كيف قمت بذلك لأي شخص مهتم بإعداده. هناك عدد من الخطوات، لكن بمجرد إكمال الإعداد، تكون النتيجة مذهلة.
قم بتثبيت إضافة hubot لمنصة discourse من الرابط: Hubot Adapter for Discourse. لتثبيت hubot على discourse، يجب إدخال متغيرات hubot مثل HUBOT_DISCOURSE_USERNAME في ملف (yourhubotfolder)/bin/hubot. يمكنك ببساطة استخدام nano أو محرر نصوص آخر لتعديل الملف وإضافة السطر: export HUBOT_DISCOURSE_USERNAME=mybot. لمزيد من التفاصيل، انتقل إلى: Discobot for training - #10 by featheredtoast
export HUBOT_DISCOURSE_USERNAME=(اسم مستخدم الروبوت، لا تستخدم discobot)
export HUBOT_DISCOURSE_KEY=(مفتاح API الخاص بمستخدم الروبوت، وليس مفتاح موقع discourse)
export HUBOT_DISCOURSE_SERVER=(رابط موقع discourse)
export API_AI_CLIENT_ACCESS_TOKEN=(مفتاح API الخاص بخادم الروبوت في Dialogflow، موجود في الإعدادات)
export GOOGLE_APPLICATION_CREDENTIALS=(yourjson).json
export DIALOGFLOW_PROJECT_ID=(اسم المشروع)
الآن، شغّل hubot بكتابة الأمر bin/hubot -a discourse-adapter. إذا أردت تشغيله حتى عندما لا تكون في الطرفية، اكتب nohup bin/hubot -a discourse-adapter &.
أرسل رسالة خاصة للروبوت للاختبار. إذا قمت بإعداد روبوت Dialogflow مع ميزة المحادثات الصغيرة، يمكنك قول “مرحباً”، “كيف حالك”، والبدء في محادثات عادية فوراً. أما المحادثات الأخرى فيجب إعدادها يدوياً. توجد بعض الدروس على يوتيوب تمثل نقطة انطلاق جيدة: https://youtu.be/HqfN9qjNj9A
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.
قبل أن أتعمق في تطبيق هذا على Discourse الخاص بي (وبما أنني لست بارعًا إلا قليلاً، ولكني جيد في اتباع التعليمات ) … هل هذه التعليمات في هذا الموضوع لا تزال تعمل؟ أو… هل هناك طريقة أحدث أو مفضلة لدمج روبوت ذكاء اصطناعي؟