ChatCompletionsAsyncClient Class

  • java.lang.Object
    • com.azure.ai.inference.ChatCompletionsAsyncClient

public final class ChatCompletionsAsyncClient

Initializes a new instance of the asynchronous ChatCompletionsClient type.

Method Summary

Modifier and Type Method and Description
Mono<ChatCompletions> complete(ChatCompletionsOptions options)

Gets chat completions for the provided chat messages.

Mono<ChatCompletions> complete(String prompt)

Gets completions for the provided input prompt.

Flux<StreamingChatCompletionsUpdate> completeStream(ChatCompletionsOptions options)

Gets chat completions for the provided chat messages.

Mono<ModelInfo> getModelInfo()

Returns information about the AI model.

Methods inherited from java.lang.Object

Method Details

complete

public Mono<ChatCompletions> complete(ChatCompletionsOptions options)

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.

Parameters:

options - Options for complete API.

Returns:

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 on successful completion of Mono.

complete

public Mono<ChatCompletions> complete(String prompt)

Gets completions for the provided input prompt. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.

Parameters:

prompt - The prompt to generate completion text from.

Returns:

completions for the provided input prompts. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data on successful completion of Mono.

completeStream

public Flux<StreamingChatCompletionsUpdate> completeStream(ChatCompletionsOptions options)

Gets chat completions for the provided chat messages. Chat completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.

Parameters:

options - 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.

Returns:

chat completions stream for the provided chat messages. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.

getModelInfo

public Mono<ModelInfo> getModelInfo()

Returns information about the AI model. The method makes a REST API call to the `/info` route on the given endpoint.

Returns:

represents some basic information about the AI model on successful completion of Mono.

Applies to