Class GoogleGenAiBatchImageModel

java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiBatchImageModel
All Implemented Interfaces:
dev.langchain4j.model.image.BatchImageModel

@Experimental public final class GoogleGenAiBatchImageModel extends Object implements dev.langchain4j.model.image.BatchImageModel
Provides an interface for interacting with the Google GenAI Batch API for Image generation models.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    cancel(String batchId)
     
    void
    Deletes a batch job from the system.
    dev.langchain4j.model.batch.BatchPage<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>>
    list(dev.langchain4j.model.batch.BatchPagination pagination)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>>
    retrieve(String batchId)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>>
    submit(dev.langchain4j.model.batch.BatchRequest<String> request)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>>
    submit(String displayName, com.google.genai.types.File file)
    Creates a batch of image generation requests from an uploaded file.
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>>
    submit(String displayName, List<String> prompts)
    Creates and enqueues a batch of image generation requests for asynchronous processing.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • builder

      public static GoogleGenAiBatchImageModel.Builder builder()
    • submit

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>> submit(dev.langchain4j.model.batch.BatchRequest<String> request)
      Specified by:
      submit in interface dev.langchain4j.model.image.BatchImageModel
    • retrieve

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>> retrieve(String batchId)
      Specified by:
      retrieve in interface dev.langchain4j.model.image.BatchImageModel
    • cancel

      public void cancel(String batchId)
      Specified by:
      cancel in interface dev.langchain4j.model.image.BatchImageModel
    • list

      public dev.langchain4j.model.batch.BatchPage<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>> list(dev.langchain4j.model.batch.BatchPagination pagination)
      Specified by:
      list in interface dev.langchain4j.model.image.BatchImageModel
    • submit

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>> submit(String displayName, List<String> prompts)
      Creates and enqueues a batch of image generation requests for asynchronous processing.
      Parameters:
      displayName - a user-defined name for the batch
      prompts - a list of image generation prompt strings to be processed in the batch
      Returns:
      a BatchResponse representing the initial state of the batch operation
    • submit

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image>> submit(String displayName, com.google.genai.types.File file)
      Creates a batch of image generation requests from an uploaded file.
      Parameters:
      displayName - a user-defined name for the batch
      file - the Google GenAI File object representing the uploaded file containing batch requests
      Returns:
      a BatchResponse representing the initial state of the batch operation
    • deleteBatchJob

      public void deleteBatchJob(String batchId)
      Deletes a batch job from the system.