Package dev.langchain4j.model.ollama
Class OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder
java.lang.Object
dev.langchain4j.model.ollama.OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder
- Enclosing class:
OllamaStreamingLanguageModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
customHeaders
(Map<String, String> customHeaders) Deprecated.logRequests
(Boolean logRequests) logResponses
(Boolean logResponses) numPredict
(Integer numPredict) repeatPenalty
(Double repeatPenalty) responseFormat
(ResponseFormat responseFormat) temperature
(Double temperature)
-
Constructor Details
-
OllamaStreamingLanguageModelBuilder
public OllamaStreamingLanguageModelBuilder()
-
-
Method Details
-
baseUrl
-
modelName
-
temperature
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder temperature(Double temperature) -
topK
-
topP
-
repeatPenalty
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder repeatPenalty(Double repeatPenalty) -
seed
-
numPredict
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder numPredict(Integer numPredict) -
numCtx
-
stop
-
format
@Deprecated public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder format(String format) Deprecated.Please useresponseFormat(ResponseFormat)
instead. For example:responseFormat(ResponseFormat.JSON)
.
Instead of using JSON mode, consider using structured outputs with JSON schema instead, see more info here. -
responseFormat
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder responseFormat(ResponseFormat responseFormat) -
timeout
-
customHeaders
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder customHeaders(Map<String, String> customHeaders) -
logRequests
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder logRequests(Boolean logRequests) -
logResponses
public OllamaStreamingLanguageModel.OllamaStreamingLanguageModelBuilder logResponses(Boolean logResponses) -
build
-
responseFormat(ResponseFormat)
instead.