Class GoogleGenAiBatchImageModel
java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiBatchImageModel
- All Implemented Interfaces:
BatchImageModel
@Experimental
public final class GoogleGenAiBatchImageModel
extends Object
implements BatchImageModel
Provides an interface for interacting with the Google GenAI Batch API for Image generation models.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voidCancels an image generation batch operation that is currently pending or running.voiddeleteBatchJob(String batchId) Deletes a batch job from the system.list(BatchPagination pagination) Lists image generation batch jobs with optional pagination.Retrieves the current state and results of an image generation batch operation.submit(BatchRequest<String> request) Creates a batch of image generation prompts and submits them for asynchronous processing.Creates a batch of image generation requests from an uploaded file.Creates and enqueues a batch of image generation requests for asynchronous processing.
-
Method Details
-
builder
-
submit
Description copied from interface:BatchImageModelCreates a batch of image generation prompts and submits them for asynchronous processing.The returned
BatchResponserepresents the status of the batch operation.- Specified by:
submitin interfaceBatchImageModel- Parameters:
request- the list of image generation prompts or requests to process- Returns:
- a
BatchResponserepresenting the initial state of the batch operation
-
retrieve
Description copied from interface:BatchImageModelRetrieves the current state and results of an image generation batch operation.The response indicates whether the batch is still processing, completed successfully, or failed. Once completed, the response will contain the generated image data.
- Specified by:
retrievein interfaceBatchImageModel- Parameters:
batchId- the batch identifier obtained fromBatchImageModel.submit(BatchRequest)- Returns:
- a
BatchResponserepresenting the current state of the image batch operation
-
cancel
Description copied from interface:BatchImageModelCancels an image generation batch operation that is currently pending or running.- Specified by:
cancelin interfaceBatchImageModel- Parameters:
batchId- the batch identifier to cancel
-
list
Description copied from interface:BatchImageModelLists image generation batch jobs with optional pagination.- Specified by:
listin interfaceBatchImageModel- Parameters:
pagination- the maximum number of batch jobs to return and token for retrieving a specific page; if null, uses server default- Returns:
- a
BatchPagecontaining image generation batch responses and pagination information
-
submit
Creates and enqueues a batch of image generation requests for asynchronous processing.- Parameters:
displayName- a user-defined name for the batchprompts- a list of image generation prompt strings to be processed in the batch- Returns:
- a
BatchResponserepresenting the initial state of the batch operation
-
submit
Creates a batch of image generation requests from an uploaded file.- Parameters:
displayName- a user-defined name for the batchfile- the Google GenAI File object representing the uploaded file containing batch requests- Returns:
- a
BatchResponserepresenting the initial state of the batch operation
-
deleteBatchJob
Deletes a batch job from the system.
-