DistributedCachingChatClient.WriteCacheAsync 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 un ChatResponse dans le cache sous-jacent. Cela est utilisé lorsqu’il existe un appel à GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).
protected:
override System::Threading::Tasks::Task ^ WriteCacheAsync(System::String ^ key, Microsoft::Extensions::AI::ChatResponse ^ value, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task WriteCacheAsync(string key, Microsoft.Extensions.AI.ChatResponse value, System.Threading.CancellationToken cancellationToken);
override this.WriteCacheAsync : string * Microsoft.Extensions.AI.ChatResponse * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overrides Function WriteCacheAsync (key As String, value As ChatResponse, cancellationToken As CancellationToken) As Task
Paramètres
- key
- String
Clé de cache.
- value
- ChatResponse
ChatResponse À stocker.
- cancellationToken
- CancellationToken
À CancellationToken surveiller pour les demandes d’annulation.
Retours
Représentant Task l’achèvement de l’opération.