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 classOpenAIClientAsyncImpl.WithRawResponseImpl
-
Constructor Summary
Constructors Constructor Description OpenAIClientAsyncImpl(ClientOptions clientOptions)
-
Method Summary
Modifier and Type Method Description OpenAIClientsync()Returns a version of this client that uses synchronous execution. OpenAIClientAsync.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. OpenAIClientAsyncwithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. CompletionServiceAsynccompletions()Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. ChatServiceAsyncchat()EmbeddingServiceAsyncembeddings()Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. FileServiceAsyncfiles()Files are used to upload documents that can be used with features like Assistants and Fine-tuning. ImageServiceAsyncimages()Given a prompt and/or an input image, the model will generate a new image. AudioServiceAsyncaudio()ModerationServiceAsyncmoderations()Given text and/or image inputs, classifies if those inputs are potentially harmful. ModelServiceAsyncmodels()List and describe the various models available in the API. FineTuningServiceAsyncfineTuning()GraderServiceAsyncgraders()VectorStoreServiceAsyncvectorStores()WebhookServiceAsyncwebhooks()BetaServiceAsyncbeta()BatchServiceAsyncbatches()Create large batches of API requests to run asynchronously. UploadServiceAsyncuploads()Use Uploads to upload large files in multiple parts. AdminServiceAsyncadmin()ResponseServiceAsyncresponses()RealtimeServiceAsyncrealtime()ConversationServiceAsyncconversations()Manage conversations and conversation items. EvalServiceAsyncevals()Manage and run evals in the OpenAI platform. ContainerServiceAsynccontainers()SkillServiceAsyncskills()VideoServiceAsyncvideos()Unitclose()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.
-
withOptions
OpenAIClientAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
completions
CompletionServiceAsync completions()
Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.
-
chat
ChatServiceAsync chat()
-
embeddings
EmbeddingServiceAsync embeddings()
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
-
files
FileServiceAsync files()
Files are used to upload documents that can be used with features like Assistants and Fine-tuning.
-
images
ImageServiceAsync images()
Given a prompt and/or an input image, the model will generate a new image.
-
audio
AudioServiceAsync audio()
-
moderations
ModerationServiceAsync moderations()
Given text and/or image inputs, classifies if those inputs are potentially harmful.
-
models
ModelServiceAsync models()
List and describe the various models available in the API.
-
fineTuning
FineTuningServiceAsync fineTuning()
-
graders
GraderServiceAsync graders()
-
vectorStores
VectorStoreServiceAsync vectorStores()
-
webhooks
WebhookServiceAsync webhooks()
-
beta
BetaServiceAsync beta()
-
batches
BatchServiceAsync batches()
Create large batches of API requests to run asynchronously.
-
uploads
UploadServiceAsync uploads()
Use Uploads to upload large files in multiple parts.
-
admin
AdminServiceAsync admin()
-
responses
ResponseServiceAsync responses()
-
realtime
RealtimeServiceAsync realtime()
-
conversations
ConversationServiceAsync conversations()
Manage conversations and conversation items.
-
evals
EvalServiceAsync evals()
Manage and run evals in the OpenAI platform.
-
containers
ContainerServiceAsync containers()
-
skills
SkillServiceAsync skills()
-
videos
VideoServiceAsync videos()
-
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.
-
-
-
-