DistributedCachingChatClient.WriteCacheAsync Método

Definição

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.

Aplica-se a