microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
865 stars 480 forks source link

Extensibility for Teams AI - ability to add to User Agent for Teams AI telemetry #6701

Closed corinagum closed 5 months ago

corinagum commented 8 months ago

Related to https://github.com/microsoft/botbuilder-js/issues/4552

Request is from https://github.com/microsoft/teams-ai team

ConnectorFactoryImpl

We are hoping to have the ability to add Teams AI information for SMBA to parse for telemetry.

Since Teams AI is JavaScript first, we request this would be done in the JS SDK first with fast follow for C# and Python

tracyboehrer commented 8 months ago

This should probably be done as JS allows it, via ConfigurationBotFrameworkAuthentication. accepting a ConnectorClientOptions, on which a UserAgent value can be included. This value is added on to our SDK UserAgent value. For example: "TeamsAI/1.0" results in "botframework-connector/4.0.0 ms-rest-js/2.7.0 Node/v16.20.2 OS/(x64-Windows_NT-10.0.22621) TeamsAI/1.0".

There is no way to enforce this though. That is, a customer could simply remove/change this in the bot.

Could also possible allow for the ConnectorClientOptions to read from Config, but it would need to be added to JS and Python.

tracyboehrer commented 5 months ago

Teams is going to subclass CloudAdapter and HttpClientFactory in order to provide appropriate requests and response headers.