semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Add Semantic Kernel to user agent and Semantic Kernel Version header to OpenAPI plugin requests

Open madsbolaris opened this issue 1 year ago • 2 comments

To allow downstream applications know that Semantic Kernel made an HTTP request from an OpenAPI plugin, we should provide the same headers and user agent as we do for Azure OpenAI

madsbolaris avatar Jul 19 '24 15:07 madsbolaris

We do this today in Python: https://github.com/microsoft/semantic-kernel/blob/0fda22e8f547e100e4dd9b8b1307142af42a251a/python/semantic_kernel/connectors/openapi_plugin/openapi_runner.py#L154C9-L157C1

moonbox3 avatar Jul 19 '24 15:07 moonbox3

@SergeyMenshykh, do we already do this in .NET?

madsbolaris avatar Jul 19 '24 15:07 madsbolaris

Yes, we do this, here's the relevant code: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Functions/Functions.OpenApi/RestApiOperationRunner.cs#L187-L189

Note: This can be overridden.

markwallace-microsoft avatar Jul 25 '24 08:07 markwallace-microsoft