IChatClient.GetStreamingResponseAsync Methode

Definitie

Hiermee worden chatberichten verzonden en het antwoord gestreamd.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> GetStreamingResponseAsync(System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage> messages, Microsoft.Extensions.AI.ChatOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetStreamingResponseAsync : seq<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Extensions.AI.ChatOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate>
Public Function GetStreamingResponseAsync (messages As IEnumerable(Of ChatMessage), Optional options As ChatOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ChatResponseUpdate)

Parameters

messages
IEnumerable<ChatMessage>

De volgorde van chatberichten die moeten worden verzonden.

options
ChatOptions

De chatopties waarmee de aanvraag moet worden geconfigureerd.

cancellationToken
CancellationToken

De CancellationToken te controleren op annuleringsaanvragen. De standaardwaarde is None.

Retouren

De antwoordberichten die door de client worden gegenereerd.

Uitzonderingen

messages is null.

Van toepassing op

Zie ook