botchatwork在网聊中提到会话ID
我们如何在botframework webchat
聊天中提到对话id
,而不是随机生成? 我们现在可以提及网webchat
的userid
username
和username
,但是不能提供对话id
。
有关此主题的更多信息,请查看指南: 发送主动消息 。
为了能够向用户发送临时消息,机器人必须首先从当前对话中收集并保存关于该用户的信息。 消息的地址属性包括机器人稍后需要向用户发送临时消息的所有信息。
bot.dialog('/', function(session, args) { var savedAddress = session.message.address; // (Save this information somewhere that it can be accessed later, such as in a database.) var message = 'Hello user, good to meet you! I now know your address and can send you notifications in the future.'; session.send(message); });
僵尸程序收集到用户信息后,可以随时向用户发送临时主动消息。 为此,它只需检索先前存储的用户数据,构build消息并发送。
function sendProactiveMessage(address) { var msg = new builder.Message().address(address); msg.text('Hello, this is a notification'); msg.textLocale('en-US'); bot.send(msg); }
- 如何在将图像上传到服务器时传递多个值(使用AngularJS和NodeJS进行file upload)?
- javascript / node.js中是否有python的inspect.getargspec的等价物?
- Bot框架与LUIS intent&match intent&pro-active对话框一起工作
- 在QnAMakerRecognizer中使用onEnabled方法
- Bot框架 – 在NodeJS中处理用户发送的图像
- 在一个机器人中使用多个QnA服务
- Microsoft chatbot(Node.js)在单个LUIS.AI应用程序中是否支持多种语言?
- 如何在bot框架触发事件(主动模板)中获取会话?
- 如何在使用botframework的luisaction绑定的同时保持privateConversation数据?
- BotFramework:是否可以结合LUIS意图和正常意图?
- 如何从bot模拟器上传文件(.pdf,.jpg..jpeg)并转换为二进制文件(base64)而不保存文件到本地驱动器?