8 implementations of GetService
Microsoft.Extensions.AI.Abstractions (1)
Embeddings\DelegatingEmbeddingGenerator.cs (1)
62public virtual object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Abstractions.Tests (1)
TestEmbeddingGenerator.cs (1)
30public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceEmbeddingGenerator.cs (1)
73public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Integration.Tests (2)
QuantizationEmbeddingGenerator.cs (2)
32public object? GetServiceGetService(Type serviceType, object? serviceKey = null) =>
Microsoft.Extensions.AI.Ollama (1)
OllamaEmbeddingGenerator.cs (1)
60public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIEmbeddingGenerator.cs (1)
99public object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (1)
30public object? GetService(Type serviceType, object? serviceKey = null)
9 references to GetService
Microsoft.Extensions.AI.Abstractions (2)
Embeddings\DelegatingEmbeddingGenerator.cs (1)
69InnerGenerator.GetService(serviceType, serviceKey);
Embeddings\EmbeddingGeneratorExtensions.cs (1)
34return (TService?)generator.GetService(typeof(TService), serviceKey);
Microsoft.Extensions.AI.Integration.Tests (1)
QuantizationEmbeddingGenerator.cs (1)
34_floatService.GetService(serviceType, serviceKey);
Microsoft.Extensions.AI.Tests (6)
Embeddings\LoggingEmbeddingGeneratorTests.cs (6)
28Assert.Null(innerGenerator.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>))); 29Assert.Same(innerGenerator, innerGenerator.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(IEmbeddingGenerator<string, Embedding<float>>))); 32Assert.NotNull(innerGenerator.AsBuilder().UseLogging(factory).Build().GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>))); 37Assert.NotNull(innerGenerator.AsBuilder().UseLogging().Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>))); 38Assert.NotNull(innerGenerator.AsBuilder().UseLogging(null).Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>))); 39Assert.Null(innerGenerator.AsBuilder().UseLogging(NullLoggerFactory.Instance).Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));