Class OllamaEmbeddingModel.OllamaEmbeddingModelBuilder
java.lang.Object
dev.langchain4j.model.ollama.OllamaEmbeddingModel.OllamaEmbeddingModelBuilder
- Enclosing class:
OllamaEmbeddingModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()customHeaders(Supplier<Map<String, String>> customHeadersSupplier) Sets a supplier for custom HTTP headers.customHeaders(Map<String, String> customHeaders) Sets custom HTTP headers.httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets theHttpClientBuilderthat will be used to create theHttpClientthat will be used to communicate with Ollama.logRequests(Boolean logRequests) logResponses(Boolean logResponses) maxRetries(Integer maxRetries)
-
Constructor Details
-
OllamaEmbeddingModelBuilder
public OllamaEmbeddingModelBuilder()
-
-
Method Details
-
httpClientBuilder
public OllamaEmbeddingModel.OllamaEmbeddingModelBuilder httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets theHttpClientBuilderthat will be used to create theHttpClientthat will be used to communicate with Ollama.NOTE:
timeout(Duration)overrides timeouts set on theHttpClientBuilder. -
baseUrl
-
modelName
-
timeout
-
maxRetries
-
logRequests
-
logResponses
-
customHeaders
public OllamaEmbeddingModel.OllamaEmbeddingModelBuilder customHeaders(Map<String, String> customHeaders) Sets custom HTTP headers. -
customHeaders
public OllamaEmbeddingModel.OllamaEmbeddingModelBuilder customHeaders(Supplier<Map<String, String>> customHeadersSupplier) Sets a supplier for custom HTTP headers. The supplier is called before each request, allowing dynamic header values. For example, this is useful for OAuth2 tokens that expire and need refreshing. -
build
-