`Hi this my code i am working on LUIS and QNA Services together but when i am sending message on Emulator i am getting some error msg
1)The bot encountered an error or bug.
2)To continue to run this bot, please fix the bot source code. `
const dispatchRecognizer = new LuisRecognizer({
applicationId: process.env.LuisAppId, endpointKey: process.env.LuisAPIKey, endpoint:
https://${ process.env.LuisAPIHostName }.api.cognitive.microsoft.com
}, { includeAllIntents: false, includeInstanceData: false }, true);
this.onMessage(async (context, next) => {
console.log('Processing Message Activity.');
let con:any=context;
console.log(context);
// First, we use the dispatch model to determine which cognitive service (LUIS or QnA) to use.
const recognizerResult = await dispatchRecognizer.recognize(con);
console.log("recogResult- ",recognizerResult);
// Top intent tell us which cognitive service to use.
const intent = LuisRecognizer.topIntent(recognizerResult);
console.log("Intent -",intent);
// Next, we call the dispatcher with the top intent.
await this.dispatchToTopIntentAsync(context, intent, recognizerResult);
await next();
});