Langue

CachingChatClient.ReadCacheStreamingAsync(String, CancellationToken) Méthode

Définition

Retourne une liste de ChatResponseUpdate valeurs précédemment mise en cache, le cas échéant. Cela est utilisé lorsqu’il existe un appel à 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))

Paramètres

key
String

Clé de cache.

cancellationToken
CancellationToken

À CancellationToken surveiller pour les demandes d’annulation.

Retours

Les données précédemment mises en cache, le cas échéant, sinon null.

Exceptions

key a la valeur null.

S’applique à