Class EmbeddingRequestChunker<E extends EmbeddingResults.Embedding<E>>

java.lang.Object
org.elasticsearch.xpack.core.inference.chunking.EmbeddingRequestChunker<E>

public class EmbeddingRequestChunker<E extends EmbeddingResults.Embedding<E>> extends Object
This class creates optimally sized batches of input strings for batched processing splitting long strings into smaller chunks. Multiple inputs may be fit into a single batch or a single large input that has been chunked may spread over multiple batches.

The final aspect is to gather the responses from the batch processing and map the results back to the original element in the input list.