8 implementations of GetService
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\DelegatingChatClient.cs (1)
66public virtual object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Abstractions.Tests (1)
TestChatClient.cs (1)
37public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
70public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Integration.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
37public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
181public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
88public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
37public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
85public virtual object? GetService(Type serviceType, object? serviceKey = null) =>
8 references to GetService
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatClientExtensions.cs (1)
27return (TService?)client.GetService(typeof(TService), serviceKey);
ChatCompletion\DelegatingChatClient.cs (1)
73InnerClient.GetService(serviceType, serviceKey);
Microsoft.Extensions.AI.Tests (6)
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)));