MicrosoftExtensionsAIChatExtensions.AsOpenAIStreamingChatCompletionUpdatesAsync メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した一連の StreamingChatCompletionUpdate インスタンスから OpenAI ChatResponseUpdate インスタンスのシーケンスを作成します。
[System.Diagnostics.CodeAnalysis.Experimental("OPENAI001")]
public static System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> AsOpenAIStreamingChatCompletionUpdatesAsync(this System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> responseUpdates, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate> AsOpenAIStreamingChatCompletionUpdatesAsync(this System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> responseUpdates, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.Experimental("OPENAI001")>]
static member AsOpenAIStreamingChatCompletionUpdatesAsync : System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate>
static member AsOpenAIStreamingChatCompletionUpdatesAsync : System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<OpenAI.Chat.StreamingChatCompletionUpdate>
<Extension()>
Public Function AsOpenAIStreamingChatCompletionUpdatesAsync (responseUpdates As IAsyncEnumerable(Of ChatResponseUpdate), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatCompletionUpdate)
パラメーター
- responseUpdates
- IAsyncEnumerable<ChatResponseUpdate>
更新インスタンス。
- cancellationToken
- CancellationToken
キャンセル要求を監視する CancellationToken 。 既定値は、None です。
戻り値
変換された ChatResponseUpdate インスタンスのシーケンス。
- 属性
例外
responseUpdates は nullです。