Class OllamaImageModel.OllamaImageModelBuilder
java.lang.Object
dev.langchain4j.model.ollama.OllamaImageModel.OllamaImageModelBuilder
- Enclosing class:
OllamaImageModel
-
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
-
OllamaImageModelBuilder
public OllamaImageModelBuilder()
-
-
Method Details
-
httpClientBuilder
public OllamaImageModel.OllamaImageModelBuilder 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
-
width
-
height
-
steps
-
seed
-
timeout
-
maxRetries
-
logRequests
-
logResponses
-
customHeaders
Sets custom HTTP headers. -
customHeaders
public OllamaImageModel.OllamaImageModelBuilder 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
-