Package com.openai.client
Class OpenAIClientAsyncImpl
-
- All Implemented Interfaces:
-
com.openai.client.OpenAIClientAsync
public final class OpenAIClientAsyncImpl implements OpenAIClientAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
OpenAIClientAsyncImpl.WithRawResponseImpl
-
Constructor Summary
Constructors Constructor Description OpenAIClientAsyncImpl(ClientOptions clientOptions)
-
Method Summary
Modifier and Type Method Description OpenAIClient
sync()
Returns a version of this client that uses synchronous execution. OpenAIClientAsync.WithRawResponse
withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method. CompletionServiceAsync
completions()
ChatServiceAsync
chat()
EmbeddingServiceAsync
embeddings()
FileServiceAsync
files()
ImageServiceAsync
images()
AudioServiceAsync
audio()
ModerationServiceAsync
moderations()
ModelServiceAsync
models()
FineTuningServiceAsync
fineTuning()
GraderServiceAsync
graders()
VectorStoreServiceAsync
vectorStores()
BetaServiceAsync
beta()
BatchServiceAsync
batches()
UploadServiceAsync
uploads()
ResponseServiceAsync
responses()
EvalServiceAsync
evals()
ContainerServiceAsync
containers()
Unit
close()
Closes this client, relinquishing any underlying resources. -
-
Constructor Detail
-
OpenAIClientAsyncImpl
OpenAIClientAsyncImpl(ClientOptions clientOptions)
-
-
Method Detail
-
sync
OpenAIClient sync()
Returns a version of this client that uses synchronous execution.
The returned client shares its resources, like its connection pool and thread pools, with this client.
-
withRawResponse
OpenAIClientAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
completions
CompletionServiceAsync completions()
-
chat
ChatServiceAsync chat()
-
embeddings
EmbeddingServiceAsync embeddings()
-
files
FileServiceAsync files()
-
images
ImageServiceAsync images()
-
audio
AudioServiceAsync audio()
-
moderations
ModerationServiceAsync moderations()
-
models
ModelServiceAsync models()
-
fineTuning
FineTuningServiceAsync fineTuning()
-
graders
GraderServiceAsync graders()
-
vectorStores
VectorStoreServiceAsync vectorStores()
-
beta
BetaServiceAsync beta()
-
batches
BatchServiceAsync batches()
-
uploads
UploadServiceAsync uploads()
-
responses
ResponseServiceAsync responses()
-
evals
EvalServiceAsync evals()
-
containers
ContainerServiceAsync containers()
-
close
Unit close()
Closes this client, relinquishing any underlying resources.
This is purposefully not inherited from AutoCloseable because the client is long-lived and usually should not be synchronously closed via try-with-resources.
It's also usually not necessary to call this method at all. the default HTTP client automatically releases threads and connections if they remain idle, but if you are writing an application that needs to aggressively release unused resources, then you may call this method.
-
-
-
-