【问题标题】:Steps to deploy botbuilder chatbot locally through webchat通过网络聊天在本地部署 botbuilder 聊天机器人的步骤
【发布时间】:2020-10-30 19:26:51
【问题描述】:

我想使用 microsoft bot builder 框架在 java 中构建一个机器人。我正在试用here 提供的样本。我想知道如何本地在网络聊天上部署使用 botbuilder-java 框架开发的机器人。

我已经盲目尝试了another ST link上列出的html如下

window.WebChat.renderWebChat({
    directLine: window.WebChat.createDirectLine({
        secret: '',
        token: '',
        domain: 'http://localhost:8080/directline',
        webSocket: false // defaults to true
    })})

但是在控制台上失败并出现各种错误。请指导我如何进行。请注意,我的机器人和网络聊天客户端需要在本地部署(不在模拟器上)。没有 Azure 部署。

谢谢。

【问题讨论】:

    标签: java botframework web-chat


    【解决方案1】:

    我发现 javascript 代码不完整。完整的代码是

    window.WebChat.renderWebChat({
            directLine: window.WebChat.createDirectLine({
                secret: '',
                token: '',
                domain: 'http://localhost:7070/directline',
                webSocket: false // defaults to true
            }),
            styleOptions: {
                hideUploadButton: true
            }
        }, document.getElementById('webchat'))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多