Interface CompletionServiceAsync
-
- All Implemented Interfaces:
public interface CompletionServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCompletionServiceAsync.WithRawResponseA view of CompletionServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract CompletionServiceAsync.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. abstract MessageServiceAsyncmessages()abstract CompletableFuture<ChatCompletion>create(ChatCompletionCreateParams params, RequestOptions requestOptions)Creates a model response for the given chat conversation. abstract CompletableFuture<ChatCompletion>create(ChatCompletionCreateParams params)Creates a model response for the given chat conversation. abstract AsyncStreamResponse<ChatCompletionChunk>createStreaming(ChatCompletionCreateParams params, RequestOptions requestOptions)Creates a model response for the given chat conversation. abstract AsyncStreamResponse<ChatCompletionChunk>createStreaming(ChatCompletionCreateParams params)Creates a model response for the given chat conversation. abstract CompletableFuture<ChatCompletion>retrieve(ChatCompletionRetrieveParams params, RequestOptions requestOptions)Get a stored chat completion. abstract CompletableFuture<ChatCompletion>retrieve(ChatCompletionRetrieveParams params)Get a stored chat completion. abstract CompletableFuture<ChatCompletion>update(ChatCompletionUpdateParams params, RequestOptions requestOptions)Modify a stored chat completion. abstract CompletableFuture<ChatCompletion>update(ChatCompletionUpdateParams params)Modify a stored chat completion. abstract CompletableFuture<ChatCompletionDeleted>delete(ChatCompletionDeleteParams params, RequestOptions requestOptions)Delete a stored chat completion. abstract CompletableFuture<ChatCompletionDeleted>delete(ChatCompletionDeleteParams params)Delete a stored chat completion. -
-
Method Detail
-
withRawResponse
abstract CompletionServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
messages
abstract MessageServiceAsync messages()
-
create
abstract 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.
-
create
abstract CompletableFuture<ChatCompletion> create(ChatCompletionCreateParams params)
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
abstract 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.
-
createStreaming
abstract AsyncStreamResponse<ChatCompletionChunk> createStreaming(ChatCompletionCreateParams params)
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.
-
retrieve
abstract CompletableFuture<ChatCompletion> retrieve(ChatCompletionRetrieveParams params, RequestOptions requestOptions)
Get a stored chat completion. Only chat completions that have been created with the
storeparameter set totruewill be returned.
-
retrieve
abstract CompletableFuture<ChatCompletion> retrieve(ChatCompletionRetrieveParams params)
Get a stored chat completion. Only chat completions that have been created with the
storeparameter set totruewill be returned.
-
update
abstract CompletableFuture<ChatCompletion> update(ChatCompletionUpdateParams params, RequestOptions requestOptions)
Modify a stored chat completion. Only chat completions that have been created with the
storeparameter set totruecan be modified. Currently, the only supported modification is to update themetadatafield.
-
update
abstract CompletableFuture<ChatCompletion> update(ChatCompletionUpdateParams params)
Modify a stored chat completion. Only chat completions that have been created with the
storeparameter set totruecan be modified. Currently, the only supported modification is to update themetadatafield.
-
delete
abstract CompletableFuture<ChatCompletionDeleted> delete(ChatCompletionDeleteParams params, RequestOptions requestOptions)
Delete a stored chat completion. Only chat completions that have been created with the
storeparameter set totruecan be deleted.
-
delete
abstract CompletableFuture<ChatCompletionDeleted> delete(ChatCompletionDeleteParams params)
Delete a stored chat completion. Only chat completions that have been created with the
storeparameter set totruecan be deleted.
-
-
-
-