Package dev.langchain4j.model.jina
Class JinaScoringModel
java.lang.Object
dev.langchain4j.model.jina.JinaScoringModel
- All Implemented Interfaces:
ScoringModel
An implementation of a
ScoringModel
that uses
Jina Reranker API.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionscoreAll
(List<TextSegment> segments, String query) Scores all providedTextSegment
s against a given query.static JinaScoringModel
withApiKey
(String apiKey) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.scoring.ScoringModel
score, score
-
Constructor Details
-
JinaScoringModel
-
-
Method Details
-
withApiKey
Deprecated, for removal: This API element is subject to removal in a future version.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases! -
scoreAll
Description copied from interface:ScoringModel
Scores all providedTextSegment
s against a given query.- Specified by:
scoreAll
in interfaceScoringModel
- Parameters:
segments
- The list ofTextSegment
s 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
TextSegment
s.
-
builder()
instead, and explicitly set the model name and, if necessary, other parameters.