Tag: botframework

Bot Framwork:多步瀑布

我想发送一个类似于这个的机器人 "[Person] wants to meet at [Place] at [Date]" 然而,如果人们错过了一些信息,我想让机器人一块一块地去索要。 例如,如果一个人写道: "Let's meet!" 机器人会提出一系列问题来满足所有的数据要求。 就像是: 我会和谁见面? 他们应该在哪里见面? 什么date和时间? 如果这个人问: "Alex would like to meet tomorrow" 那么机器人只会问 "Where should they meet?" 一旦所有需要的数据完成,它会发送一个响应,如: "Great, I will meet [Person] in [Location] at [DateTime]" 我一直在尝试这样的方法,运气不好,并得到“太多的电话session.EndDialog()”错误: dialog.on('Meeting', [ function (session, results, next) { var person = builder.EntityRecognizer.findEntity(results.entities, 'Person'); if(!person){ builder.Prompts.text(session, […]

从瀑布对话框中的用户响应获取意图

我正在和LuisDialog合作。 对于一个特定的意图,我有一个瀑布对话框来获取来自用户的信息。 在这个过程中,我想用LUISparsing用户的句子/响应。 luisDialog.on('orderItem', [ function (session, args) { builder.Prompts.text(session, "Please enter your item ID:"); }, function (session, results) { // parse user's response with LUIS // User can text: "1245" or "my item ID is 1245" // Need to get "1245" as item_number which is an entity in LUIS train model } ]); 有什么办法可以达到这个目的吗?

无法弄清楚如何生成和查看Bot服务上的nodeJs bot的日志

我最近将自己的nodeJs bot部署到了Bot Service,似乎无法弄清楚如何生成和查看日志。 当我尝试启用日志logging,我不断得到一个未知的错误 查看服务器上的日志文件,没有文件logging节点应用程序 试图login到应用程序的见解,没有成功。 帮帮我?

Bot仿真器连接到另一台机器上的Node.js服务

我有一个在Linux桌面上运行Bot Builder代码的Node.js服务。 我有一个MSFT机器人模拟器运行在我的Mac上,与桌面在同一个公司networking上。 我不能让bot模拟器连接到Node.js服务的callback。 我安装了ngrok v2.1.18,仿真器(应用程序设置)configuration了ngrokpath; 但我不断收到一条错误消息,我需要为callbackURLconfigurationngrok。 从Bot仿真器日志中, ngrok无法启动此错误: 无法启动ngrok:panic:运行时错误:无效的内存地址

Bot框架与LUIS intent&match intent&pro-active对话框一起工作

我已经使用LUIS框架构build了一个工作正常的机器人。 而在下面提到的几点,通过工作 连接LUIS意图后; 机器人无法检查正则expression式的意图 为前ex dialog.matches('^ helpdesk /我',函数()) ,我试图设置 var dialog = new builder.IntentDialog({ recognizers: [recognizer] }); 如何主动向用户发送问候消息之前发起对话,就像我会发送提示select用户可以select的用户。 如果没有什么符合这个要求,我希望LUIS工作和理解 如何知道Skype for Business频道中login的用户上下文 卡不工作在Skype的业务

如何使Node.js上的MS Bot Framework等待用户的下一个消息?

我正在尝试使用Node.js和MS Bot Framework编写我的第一个bot。 从微软提供的例子,我不知道如何实现这种情况: Bot向用户发送消息。 Bot等待用户的回答。 机器人运行另一个function来处理这个答案。 这些例子有这样的代码: if (!item.size) { // Prompt for size builder.Prompts.choice(session, "What size would you like?", "Small|Medium|Large|Extra Large"); } else { //Skip to next waterfall step next(); } 第一种方法( builder.Prompts.choice() )达到我想要的,但我不想使用丑陋的内置提示。 我宁愿手动做(发送消息给用户,提供选项,等待响应)。 第二种方法( next() )不用等待用户input就跳到下一步。 我有一个像这样创build的对话框: bot.dialog('name', [function 1() {}, function 2() {}]); 所以我只想find一个方法,使function 1输出一条消息,并等待用户input,然后继续前进到function 2 。

与Skype的Skype集成错误 – [TypeError:无法读取未定义的属性'logging器'

我正在使用skype客户端进行bot应用程序。 只要服务器收到第一条消息,就会在服务器日志中发现(内部)错误。 示例代码 var restify = require('restify'); var builder = require('botbuilder'); var calling = require('botbuilder-calling'); //========================================================= // Bot Setup //========================================================= // 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 bot var chatConnector = new builder.ChatConnector({ appId: process.env.MICROSOFT_APP_ID, appPassword: […]

如何从bot模拟器上传文件(.pdf,.jpg..jpeg)并转换为二进制文件(base64)而不保存文件到本地驱动器?

SDK平台:Node.js 如何从bot模拟器上传文件(.pdf,.jpg..jpeg),并将其转换为二进制文件(base64),而不将文件保存到本地驱动器。 代码示例: var url = session.message.attachments[0].contentUrl; var fileName=session.message.attachments[0].name; var encodedData = new Buffer(fs.createWriteStream(url+"/"+fileName), 'binary').toString('base64'); 像上面的东西,但它不是为我工作。 预期的行为: 我们需要从BOT模拟器上传文件,并将文件内容转换为二进制数据。 实际结果: ERROR:ENOENT:no such file or directory,open'D:\ User \ projects \ messages \ http:\ localhost:61058 \ v3 \ attachments \ ne1gmlim5kfg \ views \ original \ filename.pdf' 这里附加当前目录不是必需的。 作为参考: https : //github.com/Microsoft/BotBuilder/issues/3628

版本兼容性问题Azurefunction的Node和DirectlineJS es6导出

最终目标: 使用DirectLine秘密创build运行Botframework-DirectlineJS并绑定到Bot (Framework)天青function。 问题: 上面提到的Botframework-DirectlineJS使用es6 export和Azurefunction支持Node 6.5.0 max doc 。 因此,如何在Azure函数的index.js文件中成功导入DirectlineJS? Errror “` 2017-05-23T07:17:45.939 Exception while executing function: Functions.adapter. mscorlib: D:\home\site\wwwroot\adapter\importexportwrapper.js:1 (function (exports, require, module, __filename, __dirname) { import { DirectLine } from 'botframework-directlinejs'; ^^^^^^ SyntaxError: Unexpected token import at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:528:28) at Object.Module._extensions.(anonymous function) [as .js] (D:\home\site\wwwroot\node_modules\node-hook\index.js:73:14) at Module.load (module.js:473:32) at […]

在Ubuntu上安装Bot Framework模拟器时出错

我无法在ubuntu 16.04上安装微软模拟器。 我从门户网站下载了BotFramework-Emulator-3.5.29.zip文件,然后将其解压并成功运行npm install (但得到以下消息): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1(node_modules/7zip-bin/node_modules/7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@^2.1.0 (node_modules/7zip-bin/node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.0: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"}) 然后gulp build-app会引发以下错误: [14:32:40] Using gulpfile /var/www/BotFramework-Emulator-3.5.29/gulpfile.js [14:32:40] […]