你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ChatCompletionsClient.CompleteStreamingAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Begin a chat completions request and get an object that can stream response data as it becomes available.
public virtual System.Threading.Tasks.Task<Azure.AI.Inference.StreamingResponse<Azure.AI.Inference.StreamingChatCompletionsUpdate>> CompleteStreamingAsync (Azure.AI.Inference.ChatCompletionsOptions chatCompletionsOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member CompleteStreamingAsync : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.Inference.StreamingResponse<Azure.AI.Inference.StreamingChatCompletionsUpdate>>
override this.CompleteStreamingAsync : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.Inference.StreamingResponse<Azure.AI.Inference.StreamingChatCompletionsUpdate>>
Public Overridable Function CompleteStreamingAsync (chatCompletionsOptions As ChatCompletionsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of StreamingResponse(Of StreamingChatCompletionsUpdate))
Parameters
- chatCompletionsOptions
- ChatCompletionsOptions
the chat completions options for this chat completions request.
- cancellationToken
- CancellationToken
a cancellation token that can be used to cancel the initial request or ongoing streaming operation.
Returns
A response that, if the request was successful, may be asynchronously enumerated for StreamingChatCompletionsUpdate instances.
Exceptions
chatCompletionsOptions
or chatCompletionsOptions.DeploymentName.DeploymentName
is null.
chatCompletionsOptions.DeploymentName.DeploymentName
is an empty string.