你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ChatCompletionsClient.Complete 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 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.