ChatCompletionsClient.CompleteAsync 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.
Gets chat completions for the provided chat messages.
Completions support a wide variety of tasks and generate text that continues from or "completes"
provided prompt data. The method makes a REST API call to the /chat/completions
route
on the given endpoint.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Inference.ChatCompletions>> CompleteAsync (Azure.AI.Inference.ChatCompletionsOptions chatCompletionsOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member CompleteAsync : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Inference.ChatCompletions>>
override this.CompleteAsync : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Inference.ChatCompletions>>
Public Overridable Function CompleteAsync (chatCompletionsOptions As ChatCompletionsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ChatCompletions))
Parameters
- chatCompletionsOptions
- ChatCompletionsOptions
The configuration information for a chat completions request. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
chatCompletionsOptions
is null.
Applies to
Azure SDK for .NET