Package dev.langchain4j.model.voyageai
Class VoyageAiScoringModel.Builder
java.lang.Object
dev.langchain4j.model.voyageai.VoyageAiScoringModel.Builder
- Enclosing class:
VoyageAiScoringModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
logRequests
(Boolean logRequests) logResponses
(Boolean logResponses) maxRetries
(Integer maxRetries) modelName
(VoyageAiScoringModelName modelName) Name of the model.Name of the model.The number of most relevant documents to return.truncation
(Boolean truncation) Whether to truncate the input to satisfy the "context length limit" on the query and the documents.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseUrl
-
timeout
-
maxRetries
-
apiKey
-
modelName
Name of the model.- Parameters:
modelName
- Name of the model.- See Also:
-
modelName
Name of the model.- Parameters:
modelName
- Name of the model.- See Also:
-
topK
The number of most relevant documents to return. If not specified, the reranking results of all documents will be returned.- Parameters:
topK
- the number of most relevant documents to return.
-
truncation
Whether to truncate the input to satisfy the "context length limit" on the query and the documents. Defaults to true.- If true, the query and documents will be truncated to fit within the context length limit, before processed by the reranker model.
- If false, an error will be raised when the query exceeds 1000 tokens for rerank-lite-1 and 2000 tokens for rerank-1, or the sum of the number of tokens in the query and the number of tokens in any single document exceeds 4000 for rerank-lite-1 and 8000 for rerank-1.
- Parameters:
truncation
- Whether to truncate the input to satisfy the "context length limit" on the query and the documents.
-
logRequests
-
logResponses
-
build
-