I am currently looking at using Microsoft Web Chat to interact with my existing Node Js application built on MS Bot Framework Core but uses DialogFlow as NLU.
Current implementation: Web Page -> Custom UI Widget -> Connects to Node.js app built on MS Botframework Core -> Queries DialogFlow NLU to identify Intent -> Node.js app constructs the Dialog -> Gives response to user.
Looking at the Web Chat component, I cannot find references using any other NLU except Azure Bot Service. Is it mandatory to use Azure Bot Service/LUIS NLU to integrate with Web Chat?
I have also looked at offline-directline npm module but the last dev on the module is more than 3 years ago.
Firstly, responding with a quick message about using offline-directline, you should feel reasonably comfortable with it. It is a few years old, but seems to stand the test of time with continued use and little in the way of issues that I have heard.
Another option would be to use a 'browser bot'. In this scenario, the bot is contained within the hosting page's html/scripts. So, there is no reliance on using Direct Line. I don't know your whole setup, so this may or may not align with your overall needs and architecture.
As for using Web Chat with something other than the Azure Bot Service, this would be an uphill battle. In theory, this is probably achievable to some degree. The issue is that Web Chat is heavily integrated with the BotFramework-DirectLineJS library. You might be able to cherry pick specific components from Web Chat, replace the Direct Line library with a make of your own, and modify the remaining code to work with your 'service'. But, I'm not certain the effort is worth it. That is something you would have to decide for yourself.
If you do go this direction, you will likely need to configure your 'service' to send messages that conform to the BotFramework schemas when communicating with Web Chat. Even without the dependency on Direct Line for connecting to the service, much of Web Chat is still oriented towards what an incoming message looks like (i.e. a BotFramework Activity) and handling it according to the properties it contains.
To start, here are a few areas you should review in order to correctly configure you service to handle inbound and outbound messages going to and coming from Web Chat:
BotFramework Activity schema
BotFramework Card schema
BotFramework Transcript schema
Web Chat's Activity, Card, Attachments, etc. Types - at present, these are loosely defined. I would expect that to change at some point in the future which may prove to be a changing break in your specific scenario.
This is not exhaustive and would require greater research as there are likely other considerations than the few I've listed above. But, again, this may not be necessary if you decide to utilize offline-directline.
Related
I have a Text2SQL model (EditSQL: https://github.com/ryanzhumich/editsql) which I have configured to take a sentence as input and return a SQL query as output.
Now, I want to deploy this program as a chat bot application in Microsoft Teams.
I understand there's Microsoft bot framework that enables publishing a bot and the 3 options are described here.
https://learn.microsoft.com/en-us/learn/modules/choose-bot-building-tool/
However, I am not finding any of them suitable for my use case since I need to deploy a Question-Answering Bot where the Questions from users need to be sent to an external server like AWS and the response from AWS (could be an excel file) needs to be sent back to the user. Multiple questions can be the part of a conversation, so the chat client should be able to mark start and end of a conversation.
My problem:
What are the basic steps of exposing a ml model via a server so that it can be queried in production.
What are the tools that will allow me to make a client on Teams and a server for this model on AWS?
Please let me know if I should add more information on this.
Thanks
As you've seen, there are a bunch of tools/approaches to creating bots in the Microsoft world, for Teams or otherwise. Underneath, these all use the Bot Framework, but you can develop directly (i.e. write code), or use a higher-level tool like Bot Framework Composer - the choice is yours depending on your own internal skills. If you want to work with code directly, here are a bunch of bot samples, in multiple languages: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples . For isntance, here is an example of integrating the Microsoft QnAMaker service into your bot: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/python/49.qnamaker-all-features
Basically, if you go the development approach, your bot is just a web service. Once it receives the message, it can call out to any other service behind the scenes. That means it can receive a message, call out to an AWS service, receive the response, and send a reply to the user.
For multiple questions as part of a 'set' of chats, Bot Framework provides an idea called "dialogs" that should work for you.
I need to build a single Chatbot instance using BotFramework v4 that can handle multiple endpoints, and thus multiple AppID/Secret. I have seen notes online and in BotFramework samples that it is possible to do but I cannot find any specific examples for BotFramework v4.
Can anyone provide a sample on who to handle such scenario. For example, I would need to have endpoints /messages/hr and /messages/payroll, and depending on which endpoint is used the right AppID/Secret is used and specific MainMenuHrDialog or MainMenuPayrollDialog is launched.
In general, is it recommended to handle bots for different domains in the same bot project, or is it better to have separate projects for different domains with a NuGet package shared for common tasks.
So if I understand correctly, your desire to use different appIDs and secrets is gonna require multiple web app instances of similar botframework template code which executes different functions using an extension to their already existing api/messages endpoint(the default chatbot messaging endpoint). I'd recommend setting up a couple of azure web app instances along with a couple of bot channels registrations for connecting channels to your bot logic. Here's a decent resource for that: https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-deploy-basic-bot?view=azure-bot-service-4.0&tabs=csharp
Though this doesn't apply directly to your scenario, you might want to check out this sample repo here: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/typescript_nodejs/16.proactive-messages. It shows you how you could open up those extra endpoints of /api/messages/hr or /api/messages/payroll. Additionally, I'm not sure how necessary the extra appIDs and secrets are for you but if your requirement is to ensure authorization when accessing these endpoints, I'd recommend looking into this prebuilt sample as well: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/18.bot-authentication. It possesses some info about authentication and how you might differentiate between users using a combination of conversation.activity.id and tokenResponses from AzureAD.
The bot we have created uses DialogFlow as NLU Engine and uses MS BotFramework core as a dialog manager that creates dialogs as steps.
The preview version of Bot Composer looks powerful and intuitive way to create the Dialogs and manage them. But none of the documentation or Ignite Videos give a clear view whether it can be used for other NLU's(for obvious reasons, they wanted to promote LUIS).
So, curious to know if some integrated the composed with other NLU's apart from LUIS. If so, what are the caveats.
Though LUIS provides a builtin way of managing intents in Bot Framework Composer, you can still access external API's like any NLU endpoints you want to use by incorporating an HTTP step into your dialog.
I am developing a customer service chatbot, using Azure's Bot Framework in .NET, using the the Messenger channel. I wanted to know if anyone knows what the best way to handle the handoff to a human on Zendesk (which my platform already uses as its CRM platform). I'm not looking for when to do the handoff, but how to manage what happens next.
What I would love to be able to do would be that so when handoff is needed, a ticket on Zendesk would be created, sending for example a file (the transcript of the conversation so far). Then the agent would be able to solve the customer's problem in that ticket, having a conversation with him, having the bot sending messages back and forth between zendesk and messenger.
I don't know if this has been done before, or if it's at all possible. And I'm free to other solutions to the problem of handling this kind of handoff, without having to create a separate "chat" for the customer service agents to use, like it's explained on the azure documentation.
Thank you for your patience while I researched this. I found this resource that I believe will meet your needs. This functionality is built off of the Bot Framework utilizing .NET (it's also available for Nodejs). There are two available methods to connect a client to an agent.
The first (which should apply to you) aggregates different channels into one allowing an agent to pickup in the same channel where the bot handed off. The second opens a new channel when an agent joins the conversation.
Intermediator Bot
I was able to spin up a bot using this and confirmed the bot was listening for outside traffic.
Hope this helps.
Steve.
One thing that I'm about to try is this:
Bot conversation ends.
Bot service calls an Azure Function, passing the conversation content.
The Azure Function integrates with Trello API, creating an entry on a Kanban board.
So, instead of Trello as I want to do, you can make a call to the Zendesk API.
I'm writing a few articles about developing Azure bots. The next two actually are dealing with these very things. You can find out more here. sign up if you'd like to get notified over the next week or so when the new tutorials are online.
Hope that helps!
Tim
I am looking to create a bot and have come across Microsoft Bot Framework (with LUIS or can use C# SDK provided by API.AI) and Howdy.ai Botkit (with Middleware support for LUIS & API.AI).
Can someone help me with comparison between these two?
I am looking for following things in my bot -
Support multiple channels including Email.
Have the bot act in both reactive (reply to some user message) and proactive (send out message to users once a day about something important to them or followups)
manners.
Save and later retrieve user provided data (manage state).
Rich message support.
Respond with delay.
Manage conversation history.
Are there things that are available in one but not in another?
I tried developing a bot in Botkit and MS Bot framework both. Ultimately I went with MS bot framework. Some of my reasons which could help with the comparison:
MSBotFramework has support for skype, slack, telegram, Facebook, and many other channels. BotKit, the last I checked, supported only Facebook and slack. I was targeting skype and telegram and that was a deal breaker.
Botkit currently is node.js only. On the other hand, MSBotFramework has .Net, Node.js and even a REST API (which basically means you can use it from any language you want). Also, there are python wrappers available which internally make use of the REST API.
Being a Microsoft product, MSBotFramework's integration with skype, azure, azure analytics, LUIS and other Microsoft services is very easy. This could be required for developing, deploying or integrating natural language support. Botkit supports LUIS integration, which is fairly easy( maybe as easy as MSBotFramework). The analytics (through botkit studio) (was) very basic and MSBotFramework wins hands down here.
I found the documentation for MSBotFramework more comprehensive than Botkit but both of them have an equal amount of resources and documentation.
Some of the other points you have asked about:
Proactive messages depend on the channel you are developing for. For eg. Facebook allows a time window of 24 hours from the user's last message in which you can reply. Whereas other platforms like skype and telegram allow you to send a message anytime you want.
State management will need to be handled on your end. Bot Framework provides some mechanism, but it is not robust enough to be used in production.msdoc
Rich messages are platform dependent, but bot framework does pretty well in catering to most of them. So, the way this works is, you send back the message to bot framework in its own rich message format. It converts to platform specific format. If you have only one or 2 platforms in mind, you can develop accordingly.
Respond with delay - You will have to implement it yourself, though bot framework has lots of examples of doing this.github
Managing conversation can be done easily if you are using C# and .Net platform in general. The documentation and number of examples are very impressive.github repo for samples
All in all, I would recommend MS bot framework.