intents.matches()在没有任何输入的情况下自动执行

时间:2016-07-20 05:43:36

标签: node.js botframework luis

我使用IntentDialog LuisRecognizer进行自然语言输入。

在我的/firstRun对话框后,我将对话框替换为session.replaceDialog('/')以收听输入,如下所示:

bot.dialog('/firstRun', [
  function (session) {
    session.send('Hi, its nice to meet you, i\'m a Bot.')
    builder.Prompts.text(session, 'So anyway, whats your name?');
  }, function(session, results) {
     session.userData.name = results.response
     session.send('Another message')
     session.replaceDialog('/');
   }
]);

见对话:bot.dialog('/', intents);

现在发生的事情是,一旦session.replaceDialog('/')被调用并且我的/firstRun完成,我的一个意图就被解雇了,没有任何输入。

例如,这是我的一个意图:

intents.matches('MyIntent', [
  function (session, args, next) {
    console.log('My Intent has been called')
  },
])

所以问题是:没有任何输入,如何/为什么匹配Intent?

0 个答案:

没有答案
相关问题