Język

CachingChatClient.ReadCacheStreamingAsync(String, CancellationToken) Metoda

Definicja

Zwraca wcześniej buforowane listy ChatResponseUpdate wartości, jeśli są dostępne. Jest to używane w przypadku wywołania metody 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))

Parametry

key
String

Klucz pamięci podręcznej.

cancellationToken
CancellationToken

Element CancellationToken do monitorowania żądań anulowania.

Zwraca

Wcześniej buforowane dane, jeśli są dostępne, w przeciwnym razie null.

Wyjątki

Parametr key ma wartość null.

Dotyczy