CachingChatClient.ReadCacheStreamingAsync(String, CancellationToken) Metodo

Definizione

Restituisce un elenco di ChatResponseUpdate valori memorizzato nella cache, se disponibile. Questa operazione viene usata quando è presente una chiamata a GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).

protected:
 abstract System::Threading::Tasks::Task<System::Collections::Generic::IReadOnlyList<Microsoft::Extensions::AI::ChatResponseUpdate ^> ^> ^ ReadCacheStreamingAsync(System::String ^ key, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate>?> ReadCacheStreamingAsync(string key, System.Threading.CancellationToken cancellationToken);
abstract member ReadCacheStreamingAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate>>
Protected MustOverride Function ReadCacheStreamingAsync (key As String, cancellationToken As CancellationToken) As Task(Of IReadOnlyList(Of ChatResponseUpdate))

Parametri

key
String

Chiave della cache.

cancellationToken
CancellationToken

Oggetto CancellationToken da monitorare per le richieste di annullamento.

Valori restituiti

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

Eccezioni

key è null.

Si applica a