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 -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voidvoiddeleteBatchJob(String batchId) 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> 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> Creates a batch of chat requests from an uploaded file.dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse> Creates and enqueues a batch of content generation requests for asynchronous processing.
-
Method Details
-
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:
submitin interfacedev.langchain4j.model.chat.BatchChatModel
-
retrieve
public dev.langchain4j.model.batch.BatchResponse<dev.langchain4j.model.chat.response.ChatResponse> retrieve(String batchId) - Specified by:
retrievein interfacedev.langchain4j.model.chat.BatchChatModel
-
cancel
- Specified by:
cancelin interfacedev.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:
listin interfacedev.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 batchrequests- a list of chat requests to be processed in the batch- Returns:
- a
BatchResponserepresenting 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 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.
-