How can I properly get my Luis chatbot working?

自古美人都是妖i 提交于 2019-12-11 14:33:21

问题


I have to connect Luis to node.js and create my first chatbot that, as a first stage should handle simple requests.

I have checked the following links : 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

but getting started has proven to be difficult, what I've done as a first stage is:

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

and not sure how to move forward from here.

What I have in a Luis intent is: calendar.add what I have as entities is: calendar.location and calendar.subject

what I want the user to say in the bot framework channel emulator:

add a business meeting schedule in Paris.

What the bot should say: Understood the location is Paris and subject is business meeting.


回答1:


It seems that the utterance add a business meeting schedule in Paris. doesn't match the Calendar.Add intent. So you can try to manually add this utterance in the intent in your LUIS application.

  1. Go to your LUIS application, click Intents list, click Calendar.Add into the edit page.
  2. Type the utterance add a business meeting schedule in Paris. in the box, type enter add the utterance into the list.
  3. Click the business and meeting letters into a big square brackets, select Calendar.Subject in dropdown list, the same click Paris and select Calendar.Location. Finishing the actions, it should looks like:
  4. Click Save to save the edition. Then Train and publish your LUIS application.

Then your bot should match the utterance.



来源:https://stackoverflow.com/questions/47671071/how-can-i-properly-get-my-luis-chatbot-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!