Class DefaultEmbeddingRequestParameters

java.lang.Object
dev.langchain4j.model.embedding.request.DefaultEmbeddingRequestParameters
All Implemented Interfaces:
EmbeddingRequestParameters
Direct Known Subclasses:
OpenAiEmbeddingRequestParameters

@Experimental public class DefaultEmbeddingRequestParameters extends Object implements EmbeddingRequestParameters
The default, map-backed implementation of EmbeddingRequestParameters.

All values are stored in a single Map<EmbeddingParameter<?>, Object>, keyed by their EmbeddingParameter token. As a result presentParameters() is simply the map's key set and can never drift from the typed getters: introducing a new parameter automatically makes it part of the populated set, so an implementation that has not opted into it will reject requests that use it.

Only non-null values are stored, so a parameter is "present" exactly when it has been explicitly set. Provider integrations extend this class (and its DefaultEmbeddingRequestParameters.Builder) to add provider-specific parameters, reusing the same map so the opt-in mechanism keeps working for them too.

Since:
1.18.0