Class EmbeddingRequest

java.lang.Object
dev.langchain4j.model.embedding.request.EmbeddingRequest

@Experimental public class EmbeddingRequest extends Object
A request to an EmbeddingModel, containing a batch of EmbeddingInputs to embed and the per-call parameters.

The request has two dimensions:

  • the batch dimension — the list of EmbeddingInputs, each producing one embedding;
  • the interleaving dimension — the list of Content parts inside each EmbeddingInput, fused into a single embedding (for multimodal models).
For the common text case the builder accepts plain Strings and TextSegments directly, each becoming a single-text EmbeddingInput; the Content-based methods unlock multimodal input.
Since:
1.18.0