DistributedCachingEmbeddingGenerator<TInput,TEmbedding>.ReadCacheAsync Metodo

Definizione

Restituisce un oggetto memorizzato Embedding<T>nella cache in precedenza, se disponibile.

protected:
 override System::Threading::Tasks::Task<TEmbedding> ^ ReadCacheAsync(System::String ^ key, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TEmbedding?> ReadCacheAsync(string key, System.Threading.CancellationToken cancellationToken);
override this.ReadCacheAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)>
Protected Overrides Function ReadCacheAsync (key As String, cancellationToken As CancellationToken) As Task(Of TEmbedding)

Parametri

key
String

Chiave della cache.

cancellationToken
CancellationToken

Oggetto CancellationToken da monitorare per le richieste di annullamento.

Valori restituiti

Task<TEmbedding>

I dati memorizzati nella cache in precedenza, se disponibili, in caso contrario null.

Si applica a