DistributedCachingEmbeddingGeneratorBuilderExtensions.UseDistributedCache<TInput,TEmbedding> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- storage
- IDistributedCache
- configure
- Action<DistributedCachingEmbeddingGenerator<TInput,TEmbedding>>
Returns
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.