Class BatchClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.BatchClient
Create large batches of API requests to run asynchronously.
Based on Batch
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncancelBatch
(String batchId) Cancels an in-progress batchcreateBatch
(CreateBatchRequest request) Creates and executes a batch from an uploaded file of requestslistBatches
(Optional<String> after, Optional<String> limit) List your organization's batchesretrieveBatch
(String batchId) Retrieves a batch
-
Method Details
-
createBatch
Creates and executes a batch from an uploaded file of requests- Throws:
OpenAIException
- in case of API errors
-
retrieveBatch
Retrieves a batch- Throws:
OpenAIException
- in case of API errors
-
cancelBatch
Cancels an in-progress batch- Returns:
- The Batch object matching the specified ID.
- Throws:
OpenAIException
- in case of API errors
-
listBatches
List your organization's batches- Parameters:
after
- A cursor for use in pagination. after is an object ID that defines your place in the list.limit
- A limit on the number of objects to be returned.- Throws:
OpenAIException
- in case of API errors
-