Class ChatCompletionUnifiedRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.inference.ChatCompletionUnifiedRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class ChatCompletionUnifiedRequest extends RequestBase implements JsonpSerializable
Perform chat completion inference

The chat completion inference API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation. It only works with the chat_completion task type for openai and elastic inference services.

NOTE: The chat_completion task type is only available within the _stream API and only supports streaming. The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. If you use the openai, hugging_face or the elastic service, use the Chat completion inference API.

See Also: