Package dev.langchain4j.model.cohere
Class CohereScoringModel
java.lang.Object
dev.langchain4j.model.cohere.CohereScoringModel
- All Implemented Interfaces:
dev.langchain4j.model.scoring.ScoringModel
public class CohereScoringModel
extends Object
implements dev.langchain4j.model.scoring.ScoringModel
An implementation of a
ScoringModel that uses
Cohere Rerank API.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CohereScoringModelwithApiKey(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, waitMethods inherited from interface dev.langchain4j.model.scoring.ScoringModel
score, score
-
Constructor Details
-
CohereScoringModel
-
-
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. -
scoreAll
public dev.langchain4j.model.output.Response<List<Double>> scoreAll(List<dev.langchain4j.data.segment.TextSegment> segments, String query) - Specified by:
scoreAllin interfacedev.langchain4j.model.scoring.ScoringModel
-
builder()instead, and explicitly set the model name and, if necessary, other parameters.