定制机器人框架网络聊天

时间:2018-04-18 13:17:51

标签: python botframework chatbot direct-line-botframework

我已经克隆了Microsoft Bot Framework WebChat repo并且能够构建它。但我很难看到我所做的改变。

  

npm start

在本地端口上启动服务器,但它不显示网络聊天。而是显示项目中的文件。我对Angular有点熟悉,但我对React没有任何了解。我是一个基于Python构建的机器人,并在Azure中的Bot Channel注册中注册。

如何在本地启动网络聊天以查看我所做的更改?

1 个答案:

答案 0 :(得分:1)

假设您将样本留在本地计算机上的repo中,您需要转到localhost:8000/samples/{sample name}或只需从您看到的文件中单击相应的路径。

在反应样本中也是如此:

  1. Build the project: "npm run build"
  2. Start a web server: "npm run start"
  3. Aim your browser at "http://localhost:8000/samples?[parameters as listed below]"

  For ease of testing, several parameters can be set in the query string:
    * s = Direct Line secret, or
    * t = Direct Line token (obtained by calling Direct Line's Generate Token)
    * domain = optionally, the URL of an alternate Direct Line endpoint
    * webSocket = set to 'true' to use WebSocket to receive messages (currently defaults to false)
    * userid, username = id (and optionally name) of bot user
    * botid, botname = id (and optionally name) of bot