Class OllamaChatOptions.Builder
java.lang.Object
org.springframework.ai.ollama.api.OllamaChatOptions.Builder
- Enclosing class:
- OllamaChatOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Disable thinking mode for the model.Enable thinking mode for the model.frequencyPenalty(Double frequencyPenalty) internalToolExecutionEnabled(Boolean internalToolExecutionEnabled) mirostatEta(Float mirostatEta) mirostatTau(Float mirostatTau) model(OllamaModel model) numPredict(Integer numPredict) penalizeNewline(Boolean penalizeNewline) presencePenalty(Double presencePenalty) repeatLastN(Integer repeatLastN) repeatPenalty(Double repeatPenalty) temperature(Double temperature) Set thinking level to "high" (for GPT-OSS model).thinkLow()Set thinking level to "low" (for GPT-OSS model).Set thinking level to "medium" (for GPT-OSS model).thinkOption(ThinkOption thinkOption) Set the think option explicitly.toolCallbacks(List<ToolCallback> toolCallbacks) toolCallbacks(ToolCallback... toolCallbacks) toolContext(Map<String, Object> toolContext)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
-
model
-
format
-
keepAlive
-
truncate
-
useNUMA
-
numCtx
-
numBatch
-
numGPU
-
mainGPU
-
lowVRAM
-
f16KV
-
logitsAll
-
vocabOnly
-
useMMap
-
useMLock
-
numThread
-
numKeep
-
seed
-
numPredict
-
topK
-
topP
-
minP
-
tfsZ
-
typicalP
-
repeatLastN
-
temperature
-
repeatPenalty
-
presencePenalty
-
frequencyPenalty
-
mirostat
-
mirostatTau
-
mirostatEta
-
penalizeNewline
-
stop
-
enableThinking
Enable thinking mode for the model. The model will include its reasoning process in the response's thinking field.Supported by models: Qwen 3, DeepSeek-v3.1, DeepSeek R1
- Returns:
- this builder
- See Also:
-
disableThinking
Disable thinking mode for the model.- Returns:
- this builder
- See Also:
-
thinkLow
Set thinking level to "low" (for GPT-OSS model).GPT-OSS requires one of: low, medium, high. Boolean enable/disable is not supported for this model.
- Returns:
- this builder
- See Also:
-
thinkMedium
Set thinking level to "medium" (for GPT-OSS model).- Returns:
- this builder
- See Also:
-
thinkHigh
Set thinking level to "high" (for GPT-OSS model).- Returns:
- this builder
- See Also:
-
thinkOption
Set the think option explicitly. UseenableThinking(),disableThinking(),thinkLow(),thinkMedium(), orthinkHigh()for more convenient alternatives.- Parameters:
thinkOption- the think option- Returns:
- this builder
-
toolCallbacks
-
toolCallbacks
-
toolNames
-
toolNames
-
internalToolExecutionEnabled
public OllamaChatOptions.Builder internalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled) -
toolContext
-
build
-