Once you're up with a new project with the basic template provided in the Introduction, you should be able to add a LUISRecognizer like so -
var model = '' // Your LUIS Endpoint link comes here
var recognizer = new builder.LuisRecognizer(model);
Now, recognizer
is a LUISRecognizer and can pass intents based on your defined LUIS Model. You can add the recognizer
to your intents by
var intents = new builder.IntentDialog({recognizers: [recognizer]});
Your bot is now capable of handling intents from LUIS. Any named intents on LUIS can be detected by using the matches
property of IntentDialog
class. So say, an intent named hi
is defined in the LUIS model, to recognize the intent on the bot,
intents.matches('hi', function(session) {
session.send("Hey :-)");
});