howdyai / botkit-starter-web

Botkit Anywhere - a starter kit for building a bot that lives in your website or app
https://botkit.ai
MIT License
113 stars 75 forks source link

implement rasa middleware with botkit #29

Open chhavvi opened 6 years ago

chhavvi commented 6 years ago

i want to integrate rasa middleware in botkit-starter-web (the new functionality added) , i dont know how to do , plz help its urgent .

Naktibalda commented 6 years ago

Look at https://github.com/howdyai/botkit-rasa

Remove all botkit studio stuff from bot.js

Register middleware somewhere between var controller = Botkit.socketbot(bot_options); and controller.openSocketServer(controller.httpserver); by adding this code

var rasa = require('botkit-rasa')({rasa_uri: 'http://localhost:5000'});
controller.middleware.receive.use(rasa.receive);

and use rasa.hears in your controller.hears calls as given in the example.

peterswimm commented 6 years ago

Ideally you should be able to integrate RASA AND use Studio, where rasa defined intents trigger Studio based scripts and threads.

chhavvi commented 6 years ago

hi ,

Ryt now am doing the same way , jst taking the token from the botkit studio and using nothing of it anywhere in my code . Just want to confirm after getting classified (intents) how to response (i mean should i make a json file from where i have to apply check as in for the specific intent bot should reply this text.)

thank you in anticaipation.

On 23 February 2018 at 14:15, Gintautas Miselis notifications@github.com wrote:

Look at https://github.com/howdyai/botkit-rasa

Remove all botkit studio stuff from bot.js

Register middleware somewhere between var controller = Botkit.socketbot(bot_options); and controller.openSocketServer(controller.httpserver); by adding this code

var rasa = require('botkit-rasa')({rasa_uri: 'http://localhost:5000'});controller.middleware.receive.use(rasa.receive);

and use rasa.hears in your controller.hears calls as given in the example.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/howdyai/botkit-starter-web/issues/29#issuecomment-367946228, or mute the thread https://github.com/notifications/unsubscribe-auth/AV0crg3mAgtYZ0jCdQxYA3KnKLWEiDDuks5tXnqXgaJpZM4SQfvO .

Purus commented 6 years ago

You can refer the below repo for the sample integration. It works well.

https://github.com/matteoredaelli/botkit-starter-web-rasa-nlu