DistributedCachingChatClient.WriteCacheStreamingAsync Método

Definição

Armazena uma lista de ChatResponseUpdate valores no cache subjacente. Isso é usado quando há uma chamada para GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).

protected:
 override System::Threading::Tasks::Task ^ WriteCacheStreamingAsync(System::String ^ key, System::Collections::Generic::IReadOnlyList<Microsoft::Extensions::AI::ChatResponseUpdate ^> ^ value, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task WriteCacheStreamingAsync(string key, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate> value, System.Threading.CancellationToken cancellationToken);
override this.WriteCacheStreamingAsync : string * System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatResponseUpdate> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overrides Function WriteCacheStreamingAsync (key As String, value As IReadOnlyList(Of ChatResponseUpdate), cancellationToken As CancellationToken) As Task

Parâmetros

key
String

A chave de cache.

value
IReadOnlyList<ChatResponseUpdate>

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