MicrosoftExtensionsAIChatExtensions.AsChatResponseUpdatesAsync Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee maakt u een reeks exemplaren van Microsoft.Extensions.AI ChatResponseUpdate uit de opgegeven reeks OpenAI-StreamingChatCompletionUpdate-exemplaren.
[System.Diagnostics.CodeAnalysis.Experimental("OPENAI001")]
public static System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> AsChatResponseUpdatesAsync(this System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> chatCompletionUpdates, OpenAI.Chat.ChatCompletionOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> AsChatResponseUpdatesAsync(this System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> chatCompletionUpdates, OpenAI.Chat.ChatCompletionOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.Experimental("OPENAI001")>]
static member AsChatResponseUpdatesAsync : System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> * OpenAI.Chat.ChatCompletionOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate>
static member AsChatResponseUpdatesAsync : System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> * OpenAI.Chat.ChatCompletionOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate>
<Extension()>
Public Function AsChatResponseUpdatesAsync (chatCompletionUpdates As IAsyncEnumerable(Of StreamingChatCompletionUpdate), Optional options As ChatCompletionOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ChatResponseUpdate)
Parameters
- chatCompletionUpdates
- IAsyncEnumerable<StreamingChatCompletionUpdate>
De update-exemplaren.
- options
- ChatCompletionOptions
De opties die worden gebruikt bij het maken van het antwoord.
- cancellationToken
- CancellationToken
De CancellationToken te controleren op annuleringsaanvragen. De standaardwaarde is None.
Retouren
Een reeks geconverteerde ChatResponseUpdate exemplaren.
- Kenmerken
Uitzonderingen
chatCompletionUpdates is null.