0

我正在使用IntentDialog带有 aLuisRecognizer的自然语言输入。

在我/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 就会被触发,没有任何输入。

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

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

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

4

0 回答 0