我正在使用Microsoft Bot Framework在NodeJs中開發一個聊天bot。大多數情況下,它可以按預期完美工作。但有時當我與機器人通信時,我沒有立即得到答覆。進入第二個問題後,它不斷回答這兩個問題。幫我解決這個問題。我應該在服務器端做些什麼?Microsoft Bot框架無法按預期方式工作
dialog.matches('help',[
function (session, args, next) {builder.Prompts.choice(session, "I can help you to shop products for your lifestyle. You can buy from the following categories.", "Computer|TV|See more", { listStyle: builder.ListStyle["list"] });
},
function (session, results) {
if (results.response.entity=='TV') {
session.send("Wow. That sounds interesting one. We have many %s models. Ask me question like \"I want to buy black color Samsung LED Tv .\"", results.response.entity);
session.endDialog();
}else{
session.send("Selected category is expected soon.");
session.endDialog();
}
}]);
首先,您應該發佈一些代碼,以便我們可以看到您已嘗試過的內容 – DestinatioN
我在問題中添加了一些代碼示例 –