Class VoyageAiEmbeddingRequestParameters
java.lang.Object
dev.langchain4j.model.embedding.request.DefaultEmbeddingRequestParameters
dev.langchain4j.model.voyageai.VoyageAiEmbeddingRequestParameters
- All Implemented Interfaces:
EmbeddingRequestParameters
@Experimental
public class VoyageAiEmbeddingRequestParameters
extends DefaultEmbeddingRequestParameters
Voyage AI-specific
EmbeddingRequestParameters, adding the
parameters accepted by the Voyage AI embeddings API on top of the common inputType.
TRUNCATION controls what happens to an input that is longer than the model's context: it is
truncated (true, the default on Voyage's side) or the call fails (false).
ENCODING_FORMAT ("base64") only asks Voyage to compress the embeddings in the response;
the embeddings handed back to the caller are the same either way. It is carried only by the text
embeddings request - Voyage's multimodal endpoint has an equivalent output_encoding field, which
this integration does not send - so a multimodal model does not declare it in
EmbeddingModel.supportedParameters() and rejects it rather than
accepting a value that would be dropped.
- Since:
- 1.21.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EmbeddingParameter<String> static final EmbeddingParameter<Boolean> Fields inherited from interface EmbeddingRequestParameters
DIMENSIONS, EMPTY, INPUT_TYPE, MODEL_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newEmbeddingRequestParametersby combining the current parameters with the specified ones.Methods inherited from class DefaultEmbeddingRequestParameters
dimensions, equals, hashCode, inputType, modelName, parameter, presentParameters, toString
-
Field Details
-
TRUNCATION
-
ENCODING_FORMAT
-
-
Constructor Details
-
VoyageAiEmbeddingRequestParameters
-
-
Method Details
-
truncation
-
encodingFormat
-
overrideWith
Description copied from interface:EmbeddingRequestParametersCreates a newEmbeddingRequestParametersby combining the current parameters with the specified ones. Values from the specified parameters override values from the current parameters when there is overlap. Neither instance is modified.- Specified by:
overrideWithin interfaceEmbeddingRequestParameters- Overrides:
overrideWithin classDefaultEmbeddingRequestParameters- Parameters:
that- the parameters whose values will override the current ones.- Returns:
- a new combined
EmbeddingRequestParametersinstance.
-
builder
-