gpt4 book ai didi

javascript - 我尝试了通过 Node.js 连接到 LUIS 的机器人构建器的示例。我无法连接到 LUIS

转载 作者:行者123 更新时间:2023-11-28 05:23:16 27 4
gpt4 key购买 nike

我尝试通过 URL 将机器人连接到 LUIS 引擎,

var builder = require('botbuilder');

// Create bot and bind to console
var connector = new builder.ConsoleConnector().listen();
var bot = new builder.UniversalBot(connector);

// Create LUIS recognizer that points at our model and add it as the root '/' dialog for our Cortana Bot.
var model = 'https://api.projectoxford.ai/luis/v1/application?id=c413b2ef-382c-45bd-8ff0-f76d60e2a821&subscription-key=[REMOVED SUBSCRIPTION KEY]&q=';
var recognizer = new builder.LuisRecognizer(model);
var dialog = new builder.IntentDialog({ recognizers: [recognizer] });
bot.dialog('/', dialog);

// Add intent handlers
dialog.matches('builtin.intent.alarm.set_alarm', builder.DialogAction.send('Creating Alarm'));
dialog.matches('builtin.intent.alarm.delete_alarm', builder.DialogAction.send('Deleting Alarm'));
dialog.onDefault(builder.DialogAction.send("I'm sorry I didn't understand. I can only create & delete alarms."));

我收到类似的错误

D:\SID\Bot_Frame\LUIS_BOT1> Node app.js我想创建闹钟

default_error
Error: getaddrinfo EAI_AGAIN api.projectoxford.ai:443
at Object.exports._errnoException (util.js:1007:11)
at errnoException (dns.js:33:15)
at GetAddrInfoReqWrap.on lookup [as oncomplete] (dns.js:79:26)

最佳答案

这似乎是一个暂时性错误,因此首先尝试再次运行该应用程序。如果错误仍然存​​在,请检查您的网络设置。如果您使用代理;确保node and npm are well configured .

来自http://www.codingdefined.com/2015/06/nodejs-error-errno-eaiagain.html

EAI_AGAIN actually means a temporary failure in name resolution or simply the name server returned a temporary failure indication

EAI_AGAIN is actually a DNS lookup timed out error means it is either a network connectivity error or some proxy related error. Try resolving your proxy settings and check you have a decent internet connection or not.

您还可以尝试运行LUIS Node.js sample但我不认为您的代码中有错误,而且您收到的错误消息也不在您的代码周围。

关于javascript - 我尝试了通过 Node.js 连接到 LUIS 的机器人构建器的示例。我无法连接到 LUIS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40373846/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com