DistributedCachingChatClient.WriteCacheAsync Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Armazena a ChatResponse na cache subjacente. Isto é usado quando existe 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 que deve ser guardado.
- cancellationToken
- CancellationToken
O CancellationToken para monitorizar pedidos de cancelamento.
Devoluções
A Task representa a conclusão da operação.