【问题标题】:Persistent menu with Microsoft Botframework带有 Microsoft Botframework 的持久菜单
【发布时间】:2019-09-06 01:47:26
【问题描述】:

如何向 Microsoft Bot 框架添加持久菜单?我在documentation 中进行了搜索,但没有找到太多关于 UI 组件的信息。 我想实现类似 Messenger bot 的持久菜单

  <script>
    var speechOptions = {
    speechRecognizer: new CognitiveServices.SpeechRecognizer( { subscriptionKey: '***********' } ),
    speechSynthesizer: new CognitiveServices.SpeechSynthesizer(
        {
            subscriptionKey: '*************',
            gender: CognitiveServices.SynthesisGender.Female,
            voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
        })
}


        BotChat.App({

        //production evironment
        directLine: { secret: '**********************' },
        user: { id: Date.now().toString(), name: 'You'},
        bot: { id: '1234' },
        resize: 'detect',
        speechOptions: speechOptions
      }, document.getElementById("bot"));
    </script>

【问题讨论】:

  • Bot Framework 确实支持 Facebook Messenger 频道。您是说要在网络聊天中重新创建 Facebook Messenger 功能吗?如果你想使用网络聊天,那么你绝对应该使用网络聊天 v4 而不是机器人聊天。

标签: azure botframework chatbot


【解决方案1】:

对于初学者来说,您似乎正在使用已停用且不再受支持的 Web Chat v3。我强烈推荐migrating to v4

网络聊天存储库中当前存在一个问题,用于为持久菜单添加示例。您可以跟踪该问题here

关于创建自己的持久菜单,请查看this Stack Overflow 问题。您可以将持久菜单添加到窗口,然后在用户单击操作时将操作发送到网络聊天商店。我想你可以在 v3 中做类似的事情,然后从 botconnection 发布活动。

【讨论】:

猜你喜欢
  • 2021-03-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多