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.
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 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.
I have a bot in C# working with botbuilder-dotnet using the slack-adapter with my workspace. Now I want to install the slack app in other workspaces.
How can I configure the adapter to work with multiple workspaces? I think it's around this options in the constructor but couldn't find any examples: https://github.com/microsoft/botbuilder-dotnet/blob/497cb6e5192c85a82478aca475f324dd3afde4cf/libraries/Adapters/Microsoft.Bot.Builder.Adapters.Slack/SlackClientWrapper.cs#L214
Currently, the Bot Framework does not support multiple workspaces as of 4/22/21.
You did the right thing by creating a feature request in the GitHub repo. For others who're searching for this issue and would like for it to gain traction, see link tracking the issue:
https://github.com/microsoft/botbuilder-dotnet/issues/5519
The Bot Framework team will look into and assign priority to, should they decide to implement the feature request
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 have a desktop app to which I want to integrate Microsoft Teams.
Does Teams provides an API for the integration.I read few articles but they all explained how to create apps in Teams and use of Microsoft Graph API to get information about Teams/channel etc.
Could someone help me with this, if they had any solution.
few of my finding on the internet:
https://blog.thoughtstuff.co.uk/2017/04/microsoft-actively-working-on-a-teams-api/
https://developer.microsoft.com/en-us/graph/graph-explorer#
https://microsoftteams.uservoice.com/forums/555103-public/suggestions/16972258-developer-api-to-read-create-teams-and-channels-in?page=2&per_page=20
There are two distinct ways of accomplishing this:
Using the Microsoft Graph API to create/read/write information. Currently the only thing we support is the ability to add a team to an existing Office 365 Group, the ability to create and read channels within a Team, and to post a message to a team/channel. We are adding more APIs, including the ability to read messages from a channel, but it's not available yet (and we don't have a public ETA). The ability to read and write channel messages from a channel should allow you do what you want.
Controls that you can embed in an application that read/write the data for you. That's a common developer request and we will deliver that eventually, but it's further out.