如何在Microsoft Azure botbuilder中触发对话框?

时间:2018-03-07 19:47:46

标签: node.js azure botframework luis

这是我的代码:

.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);
    }
});


})

如你所见,我想:

  1. 识别用户的意图(工作正常)

  2. 开始一个 识别用户意图后的对话(不起作用)

  3. 当我知道用户的意图时,如何触发上述对话框?我在这里缺少什么?

    每当我尝试测试时,就会说:

    Oops. Something went wrong and we need to start over.
    

0 个答案:

没有答案