File: ChatCompletion\SingletonChatClientExtensions.cs | Web Access |
Project: src\test\Libraries\Microsoft.Extensions.AI.Tests\Microsoft.Extensions.AI.Tests.csproj (Microsoft.Extensions.AI.Tests) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.Extensions.AI; public static class SingletonChatClientExtensions { public static ChatClientBuilder UseSingletonMiddleware(this ChatClientBuilder builder) => builder.Use((inner, services) => new DependencyInjectionPatterns.SingletonMiddleware(inner, services)); } |