这是我的代码:
.matches('Job roles', (session) => {
lib.dialog('/HowAreYou', [
(session, args, next) => {
session.send('I\'m doing well. Thanks for asking!');
builder.Prompts.text(session, 'How are you doing today?');
}, (session, results) => {
session.endDialog('Good to hear that!');
}
]).triggerAction({
matches: /^how are you?$/i,
onSelectAction: (session, args, next) => {
// Add the help dialog to the top of the dialog stack (override the
// default behavior of replacing the stack)
session.beginDialog(args.action, args);
}
});
})
如你所见,我想:
识别用户的意图(工作正常)
开始一个 识别用户意图后的对话(不起作用)
当我知道用户的意图时,如何触发上述对话框?我在这里缺少什么?
每当我尝试测试时,就会说:
Oops. Something went wrong and we need to start over.