我正在使用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
我在问题中添加了一些代码示例 –