Język

DistributedCachingChatClient.WriteCacheStreamingAsync Metoda

Definicja

Przechowuje listę ChatResponseUpdate wartości w podstawowej pamięci podręcznej. Jest to używane w przypadku wywołania metody 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

Parametry

key
String

Klucz pamięci podręcznej.

value
IReadOnlyList<ChatResponseUpdate>

Element ChatResponse do przechowywania.

cancellationToken
CancellationToken

Element CancellationToken do monitorowania żądań anulowania.

Zwraca

Reprezentująca Task zakończenie operacji.

Dotyczy