【问题标题】:How can I properly get my Luis chatbot working?我怎样才能让我的 Luis 聊天机器人正常工作?
【发布时间】:2017-12-06 09:39:46
【问题描述】:

我必须将 Luis 连接到 node.js 并创建我的第一个聊天机器人,作为第一阶段应该处理简单的请求。

我已检查以下链接: https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/intelligence-LUIS

但事实证明,入门很困难,我在第一阶段所做的是:

var restify = require('restify');
var builder = require('botbuilder');
var http = require('http');
var recognizer = require ('recognizer');


// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
   console.log('%s listening to %s', server.name, server.url); 
});

// Create chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
    appId: MY_APP_ID,
    appPassword:MY_PASSWORD
});

var bot = new builder.UniversalBot(connector, function (session,args) {
}
});
    var recognizer = new builder.LuisRecognizer(LUIS_ENDPOINT_URL);
    bot.recognizer(recognizer);

不知道如何从这里继续前进。

我在 Luis intent 中拥有的是:calendar.add 我所拥有的entities 是:calendar.locationcalendar.subject

我希望用户在 bot 框架通道模拟器中说什么:

add a business meeting schedule in Paris.

机器人应该说什么:Understood the location is Paris and subject is business meeting.

【问题讨论】:

标签: node.js botframework chatbot azure-language-understanding


【解决方案1】:

似乎add a business meeting schedule in Paris. 的表达与Calendar.Add 的意图不匹配。因此,您可以尝试在 LUIS 应用程序的意图中手动添加此话语。

  1. 转到您的 LUIS 应用程序,单击 Intents 列表,单击 Calendar.Add 进入编辑页面。
  2. 在框中输入话语add a business meeting schedule in Paris.,输入将话语添加到列表中。
  3. 单击businessmeeting字母放入大方括号,在下拉列表中选择Calendar.Subject,同样单击Paris并选择Calendar.Location。完成动作,它应该看起来像:
  4. 点击Save保存版本。然后训练并发布您的 LUIS 应用程序。

那么你的机器人应该匹配话语。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2023-03-16
  • 2020-10-24
  • 2019-06-19
  • 2020-03-25
  • 2021-01-30
  • 2011-08-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多