Package com.google.genai
Class Batches
-
-
Method Summary
Modifier and Type Method Description BatchJobget(String name, GetBatchJobConfig config)Gets a batch job resource. voidcancel(String name, CancelBatchJobConfig config)Cancels a batch job resource. DeleteResourceJobdelete(String name, DeleteBatchJobConfig config)Deletes a batch job resource. Pager<BatchJob>list(ListBatchJobsConfig config)Makes an API request to list the available batch jobs. BatchJobcreate(String model, BatchJobSource src, CreateBatchJobConfig config)Makes an API request to create the batch job. BatchJobcreateEmbeddings(String model, EmbeddingsBatchJobSource src, CreateEmbeddingsBatchJobConfig config)Makes an API request to create the batch embeddings job. -
-
Constructor Detail
-
Batches
Batches(ApiClient apiClient)
-
-
Method Detail
-
get
BatchJob get(String name, GetBatchJobConfig config)
Gets a batch job resource.
- Parameters:
name- A fully-qualified BatchJob resource name or ID.config- A GetBatchJobConfig for configuring the get request.- Returns:
A BatchJob object that contains the info of the batch job.
-
cancel
void cancel(String name, CancelBatchJobConfig config)
Cancels a batch job resource.
- Parameters:
name- A fully-qualified BatchJob resource name or ID.config- A CancelBatchJobConfig for configuring the cancel request.
-
delete
DeleteResourceJob delete(String name, DeleteBatchJobConfig config)
Deletes a batch job resource.
- Parameters:
name- A fully-qualified BatchJob resource name or ID.config- A DeleteBatchJobConfig for configuring the delete request.
-
list
Pager<BatchJob> list(ListBatchJobsConfig config)
Makes an API request to list the available batch jobs.
- Parameters:
config- A ListBatchJobsConfig for configuring the list request.- Returns:
A Pager object that contains the list of batch jobs. The pager is an iterable and automatically queries the next page once the current page is exhausted.
-
create
BatchJob create(String model, BatchJobSource src, CreateBatchJobConfig config)
Makes an API request to create the batch job.
- Parameters:
model- the name of the GenAI model to use for generationsrc- The BatchJobSource of the batch job.config- The configuration CreateBatchJobConfig for the batch job.- Returns:
A BatchJob.
-
createEmbeddings
BatchJob createEmbeddings(String model, EmbeddingsBatchJobSource src, CreateEmbeddingsBatchJobConfig config)
Makes an API request to create the batch embeddings job.
This method is experimental.
- Parameters:
model- the name of the GenAI model to use for generationsrc- The EmbeddingsBatchJobSource of the batch job.config- The configuration CreateEmbeddingsBatchJobConfig for the batch job.- Returns:
A BatchJob.
-
-
-
-