Class BatchPage<T>

java.lang.Object
dev.langchain4j.model.batch.BatchPage<T>
Type Parameters:
T - the type of the responses payload in each batch (e.g., ChatResponse, Embedding)

@Experimental public class BatchPage<T> extends Object
Represents a set of batch jobs that is potentially paginated.

A BatchPage contains the batch operations for the current page. If more jobs are available, the nextPageToken can be used to request the next page of results.

See Also:
  • Constructor Details

    • BatchPage

      public BatchPage(List<BatchResponse<T>> batches, @Nullable String nextPageToken)
      Creates a new BatchPage.
      Parameters:
      batches - the list of batch responses for the current page
      nextPageToken - the token to pass to list methods to retrieve the next page; if present, it signifies more results are available. May be null if no more pages exist.
  • Method Details

    • batches

      public List<BatchResponse<T>> batches()
      Returns the list of batch responses for the current page.
    • nextPageToken

      public @Nullable String nextPageToken()
      Returns the token to pass to list methods to retrieve the next page, or null if no more pages exist.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object