Share via


DistributedCachingEmbeddingGeneratorBuilderExtensions.UseDistributedCache<TInput,TEmbedding> Method

Definition

public static Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> UseDistributedCache<TInput,TEmbedding> (this Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> builder, Microsoft.Extensions.Caching.Distributed.IDistributedCache? storage = default, Action<Microsoft.Extensions.AI.DistributedCachingEmbeddingGenerator<TInput,TEmbedding>>? configure = default) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member UseDistributedCache : Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> * Microsoft.Extensions.Caching.Distributed.IDistributedCache * Action<Microsoft.Extensions.AI.DistributedCachingEmbeddingGenerator<'Input, 'Embedding>> -> Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function UseDistributedCache(Of TInput, TEmbedding) (builder As EmbeddingGeneratorBuilder(Of TInput, TEmbedding), Optional storage As IDistributedCache = Nothing, Optional configure As Action(Of DistributedCachingEmbeddingGenerator(Of TInput, TEmbedding)) = Nothing) As EmbeddingGeneratorBuilder(Of TInput, TEmbedding)

Type Parameters

TInput
TEmbedding

Parameters

configure
Action<DistributedCachingEmbeddingGenerator<TInput,TEmbedding>>

Returns

Applies to