How to add custom IChatClient middlewares using services.AddAzureOpenAIChatClient? #12698
panicoenlaxbox
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using
services.AddAzureOpenAIChatClient
, and I would like to implement a customIChatClient
middleware as described here:https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai#custom-ichatclient-middleware
However, I’m not sure how to do this, because the method
semantic-kernel/dotnet/src/Connectors/Connectors.AzureOpenAI/Extensions/AzureOpenAIServiceCollectionExtensions.DependencyInjection.cs
Line 38 in 1e77014
creates the
IChatClient
internally without exposing any extensibility point, and there’s no way to inject additional.Use<CustomMiddleware>()
steps into the pipeline.Am I missing something, or is it right?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions