Class CohereEmbeddingModel.CohereEmbeddingModelBuilder
java.lang.Object
dev.langchain4j.model.cohere.CohereEmbeddingModel.CohereEmbeddingModelBuilder
- Enclosing class:
CohereEmbeddingModel
-
Method Summary
Modifier and TypeMethodDescriptionbuild()httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a custom HTTP client builder, allowing fine-grained control over the HTTP client configuration such as timeouts and proxy settings.listeners(List<EmbeddingModelListener> listeners) logger(org.slf4j.Logger logger) logRequests(Boolean logRequests) logResponses(Boolean logResponses) maxSegmentsPerBatch(Integer maxSegmentsPerBatch) toString()Base URL of Cohere's v2 embed endpoint, used byEmbeddingModel.embed(EmbeddingRequest)(the multimodal Embed v4 path).
-
Method Details
-
httpClientBuilder
public CohereEmbeddingModel.CohereEmbeddingModelBuilder httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a custom HTTP client builder, allowing fine-grained control over the HTTP client configuration such as timeouts and proxy settings.- Parameters:
httpClientBuilder- the HTTP client builder- Returns:
this
-
listeners
public CohereEmbeddingModel.CohereEmbeddingModelBuilder listeners(List<EmbeddingModelListener> listeners) -
baseUrl
-
v2BaseUrl
Base URL of Cohere's v2 embed endpoint, used byEmbeddingModel.embed(EmbeddingRequest)(the multimodal Embed v4 path). Defaults tobaseUrl(String)with/v1replaced by/v2. Set this explicitly when using a custombaseUrl(String)from which the/v2URL cannot be derived (for example a proxy whose path does not contain/v1). -
apiKey
-
modelName
-
inputType
-
timeout
-
logRequests
-
logResponses
-
logger
- Parameters:
logger- an alternateLoggerto be used instead of the default one provided by Langchain4J for logging requests and responses.- Returns:
this.
-
maxSegmentsPerBatch
public CohereEmbeddingModel.CohereEmbeddingModelBuilder maxSegmentsPerBatch(Integer maxSegmentsPerBatch) -
build
-
toString
-