Class GoogleGenAiBatchChatModel
java.lang.Object
dev.langchain4j.model.google.genai.GoogleGenAiBatchChatModel
- All Implemented Interfaces:
BatchChatModel
Provides an interface for interacting with the Google GenAI Batch API for
Chat models.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voidCancels a chat batch operation that is currently pending or running.voiddeleteBatchJob(String batchId) Deletes a batch job from the system.list(BatchPagination pagination) Lists chat batch jobs with optional pagination.Retrieves the current state and results of a chat batch operation.submit(BatchRequest<ChatRequest> request) Creates a batch of chat requests and submits them for asynchronous processing.Creates a batch of chat requests from an uploaded file.submit(String displayName, List<ChatRequest> requests) Creates and enqueues a batch of content generation requests for asynchronous processing.
-
Method Details
-
builder
-
submit
Description copied from interface:BatchChatModelCreates a batch of chat requests and submits them for asynchronous processing.The returned
BatchResponserepresents the status of the batch operation.- Specified by:
submitin interfaceBatchChatModel- Parameters:
request- the list of chat requests to process in the batch- Returns:
- a
BatchResponserepresenting the initial state of the batch operation
-
retrieve
Description copied from interface:BatchChatModelRetrieves the current state and results of a chat batch operation.The response indicates whether the batch is still processing, completed successfully, or failed. Clients should poll this method at intervals until the batch completes.
- Specified by:
retrievein interfaceBatchChatModel- Parameters:
batchId- the batch identifier obtained fromBatchChatModel.submit(BatchRequest)- Returns:
- a
BatchResponserepresenting the current state of the chat batch operation
-
cancel
Description copied from interface:BatchChatModelCancels a chat batch operation that is currently pending or running.- Specified by:
cancelin interfaceBatchChatModel- Parameters:
batchId- the batch identifier to cancel
-
list
Description copied from interface:BatchChatModelLists chat batch jobs with optional pagination.- Specified by:
listin interfaceBatchChatModel- 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 chat batch responses and pagination information
-
submit
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 batchrequests- a list of chat requests to be processed in the batch- Returns:
- a
BatchResponserepresenting the initial state of the batch operation
-
submit
Creates a batch of chat 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.
-