howdyai / botkit

Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.
MIT License
11.39k stars 2.28k forks source link

Could botkit be used with botframework's web chat? #2181

Closed pgoldweic closed 2 years ago

pgoldweic commented 2 years ago

I'm wondering whether botkit could be used with botframwork's web chat. If so, what are the requirements to make this work? I'm currently using botkit with botbuilder's web-adapter (and the reference botkit chat client), but I'd like to be able to add rich media to my client and I'm considering all the alternatives out there to get this done. Given that I'm using watson services to provide the AI capabilities (via botkit-watson-middleware), does it even make sense to, for example, convert my bot into an Azure bot in order to be able to use botframework's webchat? Any info or ideas you may have on this would be useful. I'm not really familiar with the botframework packages myself (only skimmed at the basics needed to connect botkit with botbuilder's web adapter, etc.) so any tips would be appreciated. Thanks in advance.

benbrown commented 2 years ago

Hi @pgoldweic good question!

If you use the built-in Bot Framework adapter instead of the web adapter, you should be able to use the Bot Framework web chat. That will require however that you also use the Azure Bot Service as the message passing service.

pgoldweic commented 2 years ago

Thanks so much for clarifying this @benbrown! That's very helpful.

benbrown commented 2 years ago

Please let me know if you need any assistance getting this working.

pgoldweic commented 2 years ago

Hi again @benbrown, it would be helpful if you could post here a link to the proper bot framework resource (e.g. I've found https://docs.microsoft.com/en-us/javascript/api/botbuilder/botframeworkadapter?view=botbuilder-ts-latest but I'm not sure if this is what you are referring to). Also, any sample code for connecting botkit to this adapter (and then in turn to web chat) would be ideal to see if available. BTW, I'm hoping that most of my botkit app would not need to change, and that I'd still be able to continue hosting it on AWS (let me know if my expectations are incorrect though).

benbrown commented 2 years ago

Here is the doc that talks about connecting to ABS: https://github.com/howdyai/botkit/blob/main/packages/docs/core.md#using-bot-framework-channels

Botkit provides a wrapper around the Bot Framework Adapter that is used by default if you don't configure a different one. Your app shouldn't need much change at all - just a different way of setting up the Botkit controller instance as in that doc.

pgoldweic commented 2 years ago

Thanks @benbrown!

pgoldweic commented 2 years ago

Hello again @benbrown , I have an open Stack overflow post (https://stackoverflow.com/questions/70901441/unable-to-connect-botkit-based-bot-to-botframeworks-webchat-401-errors ) explaining the issues I found when trying to connect my bot to the Bot Framework's webchat (which this Github thread suggests it should be possible). Would be great if you could take a look and possibly weigh in, as all botkit users would benefit from understanding whether this type of integration (of a non-Azure hosted botkit bot with Bot Framework's web chat) is currently being supported . Thanks in advance.