Create a bot that supports two LUIS applications in the Microsoft Bot Framework

I need to make a bilingual bot using Node.js and the Microsoft Bot Framework. The bot uses LUIS for natural language.

I use the standard LUIS connection method:

// Create bot, send welcome message:
let bot = new builder.UniversalBot(connector, NoneIntentHandler);

// Plug in LUIS:
bot.recognizer(new builder.LuisRecognizer(config.luis.url));

However, I need to support two languages: English and Chinese. Itโ€™s not a problem for me to find a language. I have two separate LUIS applications: one for English and one for Chinese, and they return the same intentions and entities.

But the problem is how to dynamically switch between two different applications, depending on the user's input language. Bot.recognizer does not accept two URLs or any other parameters. So there seems to be no built-in support for this.

bot recognizer? recognizer LUIS? ?

+4
2

:

var recognizer1 = new builder.LuisRecognizer('<model 1>');
var recognizer2 = new builder.LuisRecognizer('<model 2>');
var intents = new builder.IntentDialog({ recognizers: [recognizer1, recognizer2] });
+2

LUIS, "en-EN" "de-DE", #, , LUIS ?

0

Source: https://habr.com/ru/post/1687429/


All Articles