18 references to AsBuilder
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
83.AsBuilder()
Microsoft.Extensions.AI.Ollama.Tests (3)
OllamaChatClientIntegrationTests.cs (2)
35.AsBuilder() 60.AsBuilder()
OllamaChatClientTests.cs (1)
52.AsBuilder()
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
99.AsBuilder() 124.AsBuilder()
Microsoft.Extensions.AI.Tests (12)
ChatCompletion\ChatClientBuilderTest.cs (1)
62Assert.Throws<ArgumentNullException>("innerClient", () => ((IChatClient)null!).AsBuilder());
ChatCompletion\ConfigureOptionsChatClientTests.cs (2)
26var builder = innerClient.AsBuilder(); 59.AsBuilder()
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)));