Class CompletionServiceAsyncImpl
-
- All Implemented Interfaces:
-
com.openai.services.async.chat.CompletionServiceAsync
public final class CompletionServiceAsyncImpl implements CompletionServiceAsync
-
-
Method Summary
Modifier and Type Method Description CompletableFuture<ChatCompletion>
create(ChatCompletionCreateParams params, RequestOptions requestOptions)
Creates a model response for the given chat conversation. AsyncStreamResponse<ChatCompletionChunk>
createStreaming(ChatCompletionCreateParams params, RequestOptions requestOptions)
Creates a model response for the given chat conversation. -
-
Method Detail
-
create
CompletableFuture<ChatCompletion> create(ChatCompletionCreateParams params, RequestOptions requestOptions)
Creates a model response for the given chat conversation. Learn more in the text generation, vision, and audio guides.
Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide.
-
createStreaming
AsyncStreamResponse<ChatCompletionChunk> createStreaming(ChatCompletionCreateParams params, RequestOptions requestOptions)
Creates a model response for the given chat conversation. Learn more in the text generation, vision, and audio guides.
Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide.
-
-
-
-