1
votes

I have developed a Chat bot on Azure using Microsoft Bot Framework and Bot Builder SDK for node.js. I have enabled the Directline API v3.0 for the Bot.

I have an Express Web Application which calls the Directline API when the web page loads and generates the Conversation ID for the Bot. (I mean to say that the web app is accessing the Directline REST API in the backend instead of calling the Directline API Script in the HTML itself.)

Now i am using AJAX calls to send and receive the Activity/Activities from the BOT. The response is posted as an HTML in the web page.

After explaining my scenario here, i have some questions and need some suggestions on them:

  • I have gone through the webchat master github but seems like it only helps you in customizing the existing web-chat control and not process the GET and POST Activity from the Interface.(Please correct if there is a way it provides the implementation.)
  • Does Microsoft provides any support to build a custom chat user interface apart from web-chat above, which can recognize the bot activity response?
  • Are there any resources available where people have built great open source Custom Chat bot user interface or Chat client which can leverage the Directline API using HTML,CSS,Javascript?
  • Also i am using AJAX calls to GET and POST data to and from BOT. Is it OK from the Architectural perspective? What can be some drawbacks in this solution?
1
Too many questions in one post, and most of them are not really code related so you may not have the answers you hope. To give some input around those questions: #1 - the Webchat on Github is the full implementation, there are the GET and POST of activities inside / #2 - it is the intent of the Webchat github's project, why would there be another one? / #3 (see reply to #2)Nicolas R

1 Answers

0
votes

1) The webchat repository is a comprehensive wrapper around DirectLineJs Handling of GET and POST is done within DirectLineJs, not WebChat itself.

2) You can use DirectLineJs to create a custom chat interface (just like WebChat does).

3) I'm not aware of other html/css/javascript libraries written to interface with the DirectLine API. The Bot Framework REST API documentation should help, if you decide to build one yourself: https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-overview

4) Yes, ajax calls to the rest api are OK from an architectural perspective. I'm not aware of any drawbacks.