DistributedCachingChatClient.WriteCacheStreamingAsync Methode

Definition

Speichert eine Liste von ChatResponseUpdate Werten im zugrunde liegenden Cache. Dies wird verwendet, wenn ein Aufruf erfolgt 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

Parameter

key
String

Der Cacheschlüssel.

value
IReadOnlyList<ChatResponseUpdate>

Der ChatResponse gespeichert werden soll.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen.

Gibt zurück

A Task representing the completion of the operation.

Gilt für: