DistributedCachingChatClient.WriteCacheStreamingAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在底層快取中儲存一串 ChatResponseUpdate 數值。 當有呼叫 時 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
參數
- key
- String
快取金鑰。
- value
- IReadOnlyList<ChatResponseUpdate>
ChatResponse這些要存放的。
- cancellationToken
- CancellationToken
CancellationToken他們需要監控取消申請。
傳回
A Task 代表操作完成。