DistributedCachingEmbeddingGenerator<TInput,TEmbedding>.ReadCacheAsync Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Retorna um cache Embedding<T>anteriormente, se disponível.
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)
Parâmetros
- key
- String
A chave de cache.
- cancellationToken
- CancellationToken
O CancellationToken para monitorar solicitações de cancelamento.
Retornos
Os dados armazenados em cache anteriormente, se disponíveis, caso contrário null.