Class VoyageAiScoringModel
java.lang.Object
dev.langchain4j.model.voyageai.VoyageAiScoringModel
- All Implemented Interfaces:
ScoringModel
An implementation of a
ScoringModel that uses
Voyage AI Rerank API.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVoyageAiScoringModel(HttpClientBuilder httpClientBuilder, Map<String, String> customHeaders, String baseUrl, Duration timeout, Integer maxRetries, String apiKey, String modelName, Integer topK, Boolean truncation, Boolean logRequests, Boolean logResponses) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic VoyageAiScoringModel.Builderbuilder()scoreAll(List<TextSegment> segments, String query) Scores all providedTextSegments against a given query.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScoringModel
score, score
-
Constructor Details
-
VoyageAiScoringModel
@Deprecated(forRemoval=true, since="1.4.0") public VoyageAiScoringModel(HttpClientBuilder httpClientBuilder, Map<String, String> customHeaders, String baseUrl, Duration timeout, Integer maxRetries, String apiKey, String modelName, Integer topK, Boolean truncation, Boolean logRequests, Boolean logResponses) Deprecated, for removal: This API element is subject to removal in a future version. -
VoyageAiScoringModel
-
-
Method Details
-
scoreAll
Description copied from interface:ScoringModelScores all providedTextSegments against a given query.- Specified by:
scoreAllin interfaceScoringModel- Parameters:
segments- The list ofTextSegments to score.query- The query against which to score the segments.- Returns:
- the list of scores. The order of scores corresponds to the order of
TextSegments.
-
builder
-