CachingChatClient.WriteCacheStreamingAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Stocke une liste de ChatResponseUpdate valeurs dans le cache sous-jacent. Cela est utilisé lorsqu’il existe un appel à GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).
protected:
abstract System::Threading::Tasks::Task ^ WriteCacheStreamingAsync(System::String ^ key, System::Collections::Generic::IReadOnlyList<Microsoft::Extensions::AI::ChatResponseUpdate ^> ^ value, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task WriteCacheStreamingAsync(string key, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate> value, System.Threading.CancellationToken cancellationToken);
abstract member WriteCacheStreamingAsync : string * System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected MustOverride Function WriteCacheStreamingAsync (key As String, value As IReadOnlyList(Of ChatResponseUpdate), cancellationToken As CancellationToken) As Task
Paramètres
- key
- String
Clé de cache.
- value
- IReadOnlyList<ChatResponseUpdate>
ChatResponse À stocker.
- cancellationToken
- CancellationToken
À CancellationToken surveiller pour les demandes d’annulation.
Retours
Représentant Task l’achèvement de l’opération.
Exceptions
value a la valeur null.