Share via


EmbeddingGeneratorBuilderServiceCollectionExtensions.AddKeyedEmbeddingGenerator<TInput,TEmbedding> Method

Definition

public:
generic <typename TInput, typename TEmbedding>
 where TEmbedding : Microsoft::Extensions::AI::Embedding[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddKeyedEmbeddingGenerator(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::Object ^ serviceKey, Func<Microsoft::Extensions::AI::EmbeddingGeneratorBuilder<TInput, TEmbedding> ^, Microsoft::Extensions::AI::IEmbeddingGenerator<TInput, TEmbedding> ^> ^ generatorFactory);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddKeyedEmbeddingGenerator<TInput,TEmbedding> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, object serviceKey, Func<Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding>,Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,TEmbedding>> generatorFactory) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member AddKeyedEmbeddingGenerator : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Func<Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding>, Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, 'Embedding>> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function AddKeyedEmbeddingGenerator(Of TInput, TEmbedding) (services As IServiceCollection, serviceKey As Object, generatorFactory As Func(Of EmbeddingGeneratorBuilder(Of TInput, TEmbedding), IEmbeddingGenerator(Of TInput, TEmbedding))) As IServiceCollection

Type Parameters

TInput
TEmbedding

Parameters

serviceKey
Object
generatorFactory
Func<EmbeddingGeneratorBuilder<TInput,TEmbedding>,IEmbeddingGenerator<TInput,TEmbedding>>

Returns

Applies to