CachingEmbeddingGenerator<TInput,TEmbedding>.ReadCacheAsync Metodo

Definizione

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

protected:
 abstract System::Threading::Tasks::Task<TEmbedding> ^ ReadCacheAsync(System::String ^ key, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task<TEmbedding?> ReadCacheAsync(string key, System.Threading.CancellationToken cancellationToken);
abstract member ReadCacheAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)>
Protected MustOverride 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