Package com.openai.client
Class OpenAIClientImpl
-
- All Implemented Interfaces:
-
com.openai.client.OpenAIClient
public final class OpenAIClientImpl implements OpenAIClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
OpenAIClientImpl.WithRawResponseImpl
-
Constructor Summary
Constructors Constructor Description OpenAIClientImpl(ClientOptions clientOptions)
-
Method Summary
Modifier and Type Method Description OpenAIClientAsync
async()
Returns a version of this client that uses asynchronous execution. OpenAIClient.WithRawResponse
withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method. CompletionService
completions()
ChatService
chat()
EmbeddingService
embeddings()
FileService
files()
ImageService
images()
AudioService
audio()
ModerationService
moderations()
ModelService
models()
FineTuningService
fineTuning()
GraderService
graders()
VectorStoreService
vectorStores()
BetaService
beta()
BatchService
batches()
UploadService
uploads()
ResponseService
responses()
EvalService
evals()
ContainerService
containers()
Unit
close()
Closes this client, relinquishing any underlying resources. -
-
Constructor Detail
-
OpenAIClientImpl
OpenAIClientImpl(ClientOptions clientOptions)
-
-
Method Detail
-
async
OpenAIClientAsync async()
Returns a version of this client that uses asynchronous execution.
The returned client shares its resources, like its connection pool and thread pools, with this client.
-
withRawResponse
OpenAIClient.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
completions
CompletionService completions()
-
chat
ChatService chat()
-
embeddings
EmbeddingService embeddings()
-
files
FileService files()
-
images
ImageService images()
-
audio
AudioService audio()
-
moderations
ModerationService moderations()
-
models
ModelService models()
-
fineTuning
FineTuningService fineTuning()
-
graders
GraderService graders()
-
vectorStores
VectorStoreService vectorStores()
-
beta
BetaService beta()
-
batches
BatchService batches()
-
uploads
UploadService uploads()
-
responses
ResponseService responses()
-
evals
EvalService evals()
-
containers
ContainerService 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.
-
-
-
-