我们正在使用MSFT botbuilder 3.9并已将nodejs的所有代码迁移到3.9。但是当我们尝试调用机器人时,我们会收到此错误:Error: Dialog[*:/] not found
。请帮助解决问题。
代码段如下:
var recognizer = new builder.LuisRecognizer(model);
bot.recognizer(recognizer);
bot.dialog('Greetings', [
function (session) {
//session.send('Welcome to the Hotels finder! We are analyzing your message: \'%s\'', session.message.text);
session.send("Thank you for calling IT Helpdesk. How may i help you? ");
console.log("Hi..********");
}
]).triggerAction({
matches: 'Greetings'
}).beginDialogAction('HiMadamAction', 'HiMadamDialog', { matches: "HiMadam"});
答案 0 :(得分:0)
您的机器人没有root对话框。你需要添加一个。
例如:
bot.dialog('/', function(session) {
session.send("Hello world!");
}
有关对话框的更多信息,请查看: https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-dialog-overview