Class GoogleGenAiBatchChatModel

java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiBatchChatModel
All Implemented Interfaces:
dev.langchain4j.model.chat.BatchChatModel

@Experimental public final class GoogleGenAiBatchChatModel extends Object implements dev.langchain4j.model.chat.BatchChatModel
Provides an interface for interacting with the Google GenAI Batch API for Chat models.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • 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.chat.response.ChatResponse>
    list(dev.langchain4j.model.batch.BatchPagination pagination)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse>
    retrieve(String batchId)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse>
    submit(dev.langchain4j.model.batch.BatchRequest<dev.langchain4j.model.chat.request.ChatRequest> request)
     
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse>
    submit(String displayName, com.google.genai.types.File file)
    Creates a batch of chat requests from an uploaded file.
    dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse>
    submit(String displayName, List<dev.langchain4j.model.chat.request.ChatRequest> requests)
    Creates and enqueues a batch of content 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 GoogleGenAiBatchChatModel.Builder builder()
    • submit

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse> submit(dev.langchain4j.model.batch.BatchRequest<dev.langchain4j.model.chat.request.ChatRequest> request)
      Specified by:
      submit in interface dev.langchain4j.model.chat.BatchChatModel
    • retrieve

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse> retrieve(String batchId)
      Specified by:
      retrieve in interface dev.langchain4j.model.chat.BatchChatModel
    • cancel

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

      public dev.langchain4j.model.batch.BatchPage<dev.langchain4j.model.chat.response.ChatResponse> list(dev.langchain4j.model.batch.BatchPagination pagination)
      Specified by:
      list in interface dev.langchain4j.model.chat.BatchChatModel
    • submit

      public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse> submit(String displayName, List<dev.langchain4j.model.chat.request.ChatRequest> requests)
      Creates and enqueues a batch of content generation requests for asynchronous processing. All requests must use the same model.
      Parameters:
      displayName - a user-defined name for the batch
      requests - a list of chat requests 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.chat.response.ChatResponse> submit(String displayName, com.google.genai.types.File file)
      Creates a batch of chat 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.