26 references to Build
Microsoft.Extensions.AI (2)
ChatCompletion\ChatClientBuilderServiceCollectionExtensions.cs (2)
36_ = serviceCollection.AddSingleton(builder.Build); 68_ = serviceCollection.AddKeyedSingleton(serviceKey, (services, _) => builder.Build(services));
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
87.Build();
Microsoft.Extensions.AI.Ollama.Tests (3)
OllamaChatClientIntegrationTests.cs (2)
39.Build(); 64.Build();
OllamaChatClientTests.cs (1)
56.Build();
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
103.Build(); 128.Build();
Microsoft.Extensions.AI.Tests (18)
ChatCompletion\ChatClientBuilderTest.cs (4)
32Assert.Same(expectedOuterClient, builder.Build(expectedServiceProvider)); 47var first = (InnerClientCapturingChatClient)builder.Build(); 77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 96builder.Build();
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
74.Build();
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
373IChatClient service = innerClient.AsBuilder().UseFunctionInvocation().Build(); 586IChatClient service = configurePipeline(innerClient.AsBuilder()).Build(services); 676IChatClient service = configurePipeline(innerClient.AsBuilder()).Build(services);
ChatCompletion\LoggingChatClientTests.cs (6)
29Assert.Null(innerClient.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(LoggingChatClient))); 30Assert.Same(innerClient, innerClient.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(IChatClient))); 33Assert.NotNull(innerClient.AsBuilder().UseLogging(factory).Build().GetService(typeof(LoggingChatClient))); 38Assert.NotNull(innerClient.AsBuilder().UseLogging().Build(services).GetService(typeof(LoggingChatClient))); 39Assert.NotNull(innerClient.AsBuilder().UseLogging(null).Build(services).GetService(typeof(LoggingChatClient))); 40Assert.Null(innerClient.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build(services).GetService(typeof(LoggingChatClient)));
ChatCompletion\UseDelegateChatClientTests.cs (4)
72.Build(); 114.Build(); 165.Build(); 236.Build();