DistributedCachingChatClient.WriteCacheAsync Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Armazena um ChatResponse no cache subjacente. Isso é usado quando há uma chamada para 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
Parâmetros
- key
- String
A chave de cache.
- value
- ChatResponse
O ChatResponse a ser armazenado.
- cancellationToken
- CancellationToken
O CancellationToken para monitorar solicitações de cancelamento.
Retornos
Um Task que representa a conclusão da operação.