【问题标题】:typing indicator in chatbot聊天机器人中的打字指示器
【发布时间】:2019-10-25 18:14:11
【问题描述】:

nodejs 中机器人框架的打字指示器

嗨,

我正在使用 microsoft bot 框架 v4、node js,我需要在聊天机器人中实现打字。在发送原始响应之前,机器人应该响应 like(...) 作为响应。 我在这里看到了代码Send a typing indicator in bot-framework v4 using DirectLine and webchat (Node.js)

代码在本地运行良好,但是当我将其部署到 azure 时,打字(...)没有出现,我可以看到 azure 响应延迟 3 秒。

我的代码

await step.context.sendActivities([
                                { type: 'typing' },
                                { type: 'delay', value: 3000 },

                            ]);`

谢谢 桑吉夫·高塔姆

【问题讨论】:

  • 部署到 Azure 后,您在哪个渠道遇到此行为?
  • 打字指示器IS正常工作,但是您遇到延迟了吗?您在哪些渠道遇到了这些延迟
  • @Mick 和@Marc Asmar,我正在使用网页作为频道。

标签: botframework chatbot


【解决方案1】:

感谢您的帮助和建议。我在 chatter.html 的 botConnection 中更改了 webSocket: true, 并解决了我的目的。之前是 webSocket: false。

 var botConnection = new BotChat.DirectLine({
        secret: model.secret,
        token: model.token,
        domain: model.directLineUrl,
        webSocket: true,
        conversationId: getPersistedConversationId(),
        watermark: 0
    }); 

谢谢 桑吉夫·高塔姆

【讨论】:

    【解决方案2】:

    不幸的是,这似乎是网络聊天测试中的一个错误。正如预期的那样,打字指示器应该清晰地显示出来。在 BotFramework-WebChat 存储库 here 报告该错误时创建了一个问题。

    我建议对此问题发表评论,以便网络聊天开发人员可以充分了解任何影响。

    希望有帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-12
      • 2022-12-23
      • 2020-09-10
      • 2018-05-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多