通过Webchat在本地部署botbuilder chatbot的步骤

问题描述

我想使用Microsoft Bot Builder框架在Java中构建Bot。我正在尝试提供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
    })})

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

谢谢。

解决方法

我发现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'))