Nodejs 中机器人框架的输入指示器
Hi,
我正在使用 microsoft bot 框架 v4、node js,我需要在聊天机器人中实现输入。在发送原始响应之前,机器人应该像(...)一样响应。
我在这里看到了代码使用 DirectLine 和网络聊天 (Node.js) 在 bot-framework v4 中发送打字指示符 https://stackoverflow.com/questions/53582445/send-a-typing-indicator-in-bot-framework-v4-using-directline-and-webchat-node-j
代码在本地工作正常,但是当我将其部署到 azure 时,打字(...) 没有出现,我可以看到 azure 中的响应延迟了 3 秒。
my code
await step.context.sendActivities([
{ type: 'typing' },
{ type: 'delay', value: 3000 },
]);`
谢谢
桑吉夫·高塔姆
感谢您的帮助和建议。我变了网络套接字:正确,在chatter.html的botConnection中并解决了我的目的。之前是webSocket: false。
var botConnection = new BotChat.DirectLine({
secret: model.secret,
token: model.token,
domain: model.directLineUrl,
webSocket: true,
conversationId: getPersistedConversationId(),
watermark: 0
});
谢谢
桑吉夫·高塔姆
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)