Bot 框架服务与 Bot 连接器服务

Bot Framework Service vs Bot Connector Service

Bot Framework Service 和 Bot Connector Service 是否相同?或者 Bot Framework Service 是 Bot Connector Service 之上的一层?我很困惑,因为它们可以互换使用。

我了解 Bot Framework Web 聊天组件使用直线 api 通过 Bot Framework Service/Bot 连接器服务与机器人通信。但是 Bot Framework Service 是否实现了直线协议来理解来自 Web Chat 的请求?有人可以给我完整/端到端的图片吗?

谢谢!

我同意文档非常混乱,并且这些术语可以互换使用。实际上,当您深入了解 Bot Framework 端的处理方式时,Bot Framework Service 和 Bot Connector Service 是两个不同的术语。如果您查看网站上已有的文档,

The Bot Connector service enables your bot to exchange messages with channels configured in the Bot Framework Portal. It uses industry-standard REST and JSON over HTTPS and enables authentication with JWT Bearer tokens.

The Bot Framework Service, which is a component of the Azure Bot Service, sends information between the user's bot-connected app (such as Facebook, Skype, Slack, etc. which we call the channel) and the bot.

现在来区别,

The Bot Framework Service lives in the cloud and takes on the role of translating the data from the APIs of multiple supported Channels into the Bot Framework protocol in a form that your local bot code can understand. This allows your bot to communicate with multiple channels, without having to understand which Channel the data is coming from. The client actually makes the REST calls to the Bot Framework Service, specifically the CreateConnectorClient() method in the BotFrameworkAdapter class which sends the outbound request back towards the Bot Framework Service, which eventually talks to the channel.

The Bot Framework Service works both inbound and outbound whereas the Bot Connector Service works only outbound. The Bot Connector Service exchanges information between between bot and channel (user) by passing an Activity object. When your bot sends a request to the Bot Connector Service, it must include information that the Connector service can use to verify its identity. Likewise, when the Connector service sends a request to your bot, it must include information that the bot can use to verify its identity.

如果你看一下这个流程图,它会解释主要内容 bot logic

此图解释了 steps 用于机器人到连接器的身份验证。

此图解释了连接器到机器人身份验证的steps

注意:我们目前正在更新我们的文档,提供更详细的信息和流程图,以帮助用户了解 Azure 机器人服务的每个组件。一旦发布,我将使用更新的链接更新线程。

希望这对您有所帮助。