CachingEmbeddingGenerator<TInput,TEmbedding> Class
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.
Represents a delegating embedding generator that caches the results of embedding generation calls.
generic <typename TInput, typename TEmbedding>
where TEmbedding : Embeddingpublic ref class CachingEmbeddingGenerator abstract : Microsoft::Extensions::AI::DelegatingEmbeddingGenerator<TInput, TEmbedding>
public abstract class CachingEmbeddingGenerator<TInput,TEmbedding> : Microsoft.Extensions.AI.DelegatingEmbeddingGenerator<TInput,TEmbedding> where TEmbedding : Embedding
type CachingEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Embedding)> = class
inherit DelegatingEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Embedding)>
Public MustInherit Class CachingEmbeddingGenerator(Of TInput, TEmbedding)
Inherits DelegatingEmbeddingGenerator(Of TInput, TEmbedding)
- TInput
The type from which embeddings will be generated.
- TEmbedding
The type of embeddings to generate.
- Inheritance
- Derived
Caching |
Initializes a new instance of the CachingEmbeddingGenerator<TInput,TEmbedding> class. |
Inner |
Gets the inner IEmbeddingGenerator<TInput,TEmbedding>. (Inherited from DelegatingEmbeddingGenerator<TInput,TEmbedding>) |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from DelegatingEmbeddingGenerator<TInput,TEmbedding>) |
Dispose(Boolean) |
Provides a mechanism for releasing unmanaged resources. (Inherited from DelegatingEmbeddingGenerator<TInput,TEmbedding>) |
Generate |
|
Get |
Computes a cache key for the specified values. |
Get |
Asks the IEmbeddingGenerator<TInput,TEmbedding> for an object of the specified type |
Read |
Returns a previously cached Embedding<T>, if available. |
Write |
Stores a |
As |
Creates a new EmbeddingGeneratorBuilder<TInput,TEmbedding> using
|
Generate |
Generates embeddings for each of the supplied |
Generate |
Generates an embedding from the specified |
Get |
Asks the IEmbeddingGenerator<TInput,TEmbedding> for an object of type |
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: