Instale o plugin hubot para o Discourse Hubot Adapter for Discourse. Para instalar o hubot no seu Discourse, as variáveis do hubot, como HUBOT_DISCOURSE_USERNAME, são inseridas no arquivo (sua_pasta_do_hubot)/bin/hubot. Basta usar o nano ou editá-lo para escrever export HUBOT_DISCOURSE_USERNAME=meubot. Para mais detalhes, acesse Discobot for training - #10 by featheredtoast
export HUBOT_DISCOURSE_USERNAME=(nome_de_usuário_do_bot, não use discobot)
export HUBOT_DISCOURSE_KEY=(chave de API do usuário do bot, não a chave de API do site)
export HUBOT_DISCOURSE_SERVER=(url do Discourse)
export API_AI_CLIENT_ACCESS_TOKEN=(token de acesso da API do servidor do bot no Dialogflow, encontrado nas configurações)
export GOOGLE_APPLICATION_CREDENTIALS=(seuarquivo).json
export DIALOGFLOW_PROJECT_ID=(nomedoprojeto)
Agora inicie seu hubot digitando bin/hubot -a discourse-adapter para executá-lo. Se quiser que ele continue rodando mesmo quando você não estiver no terminal, digite nohup bin/hubot -a discourse-adapter &
Envie uma mensagem privada ao bot para testes. Se você configurou o bot do Dialogflow com conversas casuais, pode dizer oi, como vai e iniciar uma conversa casual imediatamente. Outros diálogos precisam ser configurados. Existem alguns tutoriais no YouTube que são um bom ponto de partida: 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.
Antes de mergulhar na implementação no meu Discourse (e como sou apenas um pouco proficiente, mas bom em seguir instruções )… estas instruções neste tópico ainda estão funcionando? Ou… existe uma maneira mais atual ou preferida de integrar um bot de IA?