3

I am trying to build a chatbot using botkit anywhere and nodejs. I don't want to use any third-party messaging platform. I refer to this link https://github.com/howdyai/botkit#build-your-bot and try to setup chatbot in nodejs application:

First, add it to your project:

npm install --save botkit

Then, add Botkit to your application code:

var Botkit = require('botkit');

var controller = Botkit.anywhere(configuration);

controller.hears('hello','direct_message', function(bot, message) { bot.reply(message,'Hello yourself!'); });

But they don't mention how to call and where to call this code in the existing application.

Nicholas Sizer
  • 3,490
  • 3
  • 26
  • 29
Arti Berde
  • 1,182
  • 1
  • 11
  • 23

2 Answers2

0

Before you start you need a NLU middle ware. Since you don't want to use 3rd party services, you can use RASA NLU and Botkit has easy integration too.

https://github.com/RasaHQ/rasa_nlu

Then You can the below easy to use Botkit-Anywhere-RASA library.

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

1) Star the RASA NLU server

2) Clone the starter project (#2) and run using "node ."

Purus
  • 5,701
  • 9
  • 50
  • 89
0

For Botkit Web anywhere: I followed following URL steps: https://botkit.ai/getstarted.html

after these steps my folder structure is like below:

enter image description here

you can navigate to public->client.js and here you can find method.

Siva
  • 375
  • 3
  • 5