Dela via


ChatCompletionsClient.Complete Method

Definition

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 Azure.Response<Azure.AI.Inference.ChatCompletions> Complete (Azure.AI.Inference.ChatCompletionsOptions chatCompletionsOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member Complete : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Inference.ChatCompletions>
override this.Complete : Azure.AI.Inference.ChatCompletionsOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Inference.ChatCompletions>
Public Overridable Function Complete (chatCompletionsOptions As ChatCompletionsOptions, Optional cancellationToken As CancellationToken = Nothing) As 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