Closed lopejum closed 4 years ago
Hi @lopejum, a few questions for you:
I'm curious...why use an external service? Why not use the bot to do you various processing and communicate with the various app services directly from the bot utilizing the different adapters already available?
Hello @stevkan
First, thanks a lot for your message.
I'll start with the curiosity (we're building an omnichannel intelligent conversational system framework):
So, our final architecture is: [ABB] <--> [G] <--> [S] <--> [OS]
Let me explain every module: [AAB] [Module A -Azure Bot "Bridge"] It's a simple Azure EchoBot (C#), since we can activate any of native channels (Azure Web-Chat, custom webchat, Telegram, Teams...). This bot receives our text form any text channel and we "forward" this text to the next module [G]
[G] [Custom Gateway]: A Tornado Web Api, that has methods to receive (via websockets) binary info from Twilio telephone call, translate to text (using Azure Speech -Speech-to-Text-), and send it to module [S]. Another service that receives info from Twilio WhatsApp API info (WhatsApp channel), and send it to module [S]. And our simple service that receives text from our [AAB] and redirect to [S].
[S] [Custom Azure Python Bot SDK]: receives the text from [G], makes the hard work of processing the info (call to Azure Maps, Computer Vision, LUIS, QnA Maker, CosmosDB, Storage, etc.). This module does no have any interaction with Internet but the module [G]. And of course, this module is like a custom Azure Composer (hard logic for the dialog)
[OS] [Other Services]: As explained before: Azure Maps, Computer Vision, LUIS, QnA Maker, CosmosDB, Storage, etc.
For realtime-audio / whatsapp, no problem: We use Twilio API to response from [G]. For input texts, from azure native channels, we needed to response to the client "from [G] crossing [AAB]"... and I couldn't find the way... (Enter from Azure WebChat, Teams, Telegram,... any native channel; and response from DirectLine channel).
FINALLY, I found a "workaround" and solution for my architecture (create a new proactive service into my [AAB] module for receiving the messages that need to be sent, from my system, to the final client text app): The idea started from this blog, that was based in this info and implemented and deployed in this original azure project
So, that way, I can have any azure native text channel to send & receive messages (proactive) from my custom bot system.
Thanks a lot for your support!!
Best regards Lope
@lopejum, I'm glad you were able to find a working solution. Closing this issue as resolved.
Hello
The scenario (basically, I use an Azure Bot as a Bridge between text apps -Teams, Telegram, Skype, custom webchat... and my webservice that produces info as response according the arriving text from those text apps). So:
At this point I have: conversationId, userId, recipient, serviceUrl... All of them I have retrieved in my C# bot and sent as params to my webservice.
For every post request to my bot (trying to response to my writen texts by the client) I use activities end-point (depending of the Channel: directline, Telegram, Teams, Azure WebChat) like these: http://webchat.botframework.../v3/.../conversations/; http://directline.botframework..../v3/.../conversations/; https://smba.traffic.....
I send the body as {type, from, recipient, serviceUrl....} In the post request.
My questions:
Whats the best way to response from an external webservice though my bot to the client text app?
Kind regards Lope