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)
62
Assert.Throws<ArgumentNullException>("innerClient", () => ((IChatClient)null!).
AsBuilder
());
ChatCompletion\ConfigureOptionsChatClientTests.cs (2)
26
var builder = innerClient.
AsBuilder
();
59
.
AsBuilder
()
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
373
IChatClient service = innerClient.
AsBuilder
().UseFunctionInvocation().Build();
586
IChatClient service = configurePipeline(innerClient.
AsBuilder
()).Build(services);
676
IChatClient service = configurePipeline(innerClient.
AsBuilder
()).Build(services);
ChatCompletion\LoggingChatClientTests.cs (6)
29
Assert.Null(innerClient.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(LoggingChatClient)));
30
Assert.Same(innerClient, innerClient.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(IChatClient)));
33
Assert.NotNull(innerClient.
AsBuilder
().UseLogging(factory).Build().GetService(typeof(LoggingChatClient)));
38
Assert.NotNull(innerClient.
AsBuilder
().UseLogging().Build(services).GetService(typeof(LoggingChatClient)));
39
Assert.NotNull(innerClient.
AsBuilder
().UseLogging(null).Build(services).GetService(typeof(LoggingChatClient)));
40
Assert.Null(innerClient.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build(services).GetService(typeof(LoggingChatClient)));