OpenAIClient.GetCompletionsStreamingAsync 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 completions request and get an object that can stream response data as it becomes available.
public virtual System.Threading.Tasks.Task<Azure.AI.OpenAI.StreamingResponse<Azure.AI.OpenAI.Completions>> GetCompletionsStreamingAsync (Azure.AI.OpenAI.CompletionsOptions completionsOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member GetCompletionsStreamingAsync : Azure.AI.OpenAI.CompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.OpenAI.StreamingResponse<Azure.AI.OpenAI.Completions>>
override this.GetCompletionsStreamingAsync : Azure.AI.OpenAI.CompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.OpenAI.StreamingResponse<Azure.AI.OpenAI.Completions>>
Public Overridable Function GetCompletionsStreamingAsync (completionsOptions As CompletionsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of StreamingResponse(Of Completions))
Parameters
- completionsOptions
- CompletionsOptions
the chat completions options for this 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 Completions instances.
Exceptions
completionsOptions
or completionsOptions.DeploymentName.DeploymentName
is null.
completionsOptions.DeploymentName.DeploymentName
is an empty string.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for