Enum Class OllamaObject.Thinking
- All Implemented Interfaces:
Serializable, Comparable<OllamaObject.Thinking>, Constable
- Enclosing class:
OllamaObject
Represents the "thinking" tier that can be requested from an Ollama model via the
think request field.
Support for this varies by model, and models that do support it do not agree on a single scheme:
- Some models only understand a boolean toggle —
TRUE/FALSE - Others understand graded levels —
LOW,MEDIUM,HIGH,MAX
HIGH to
a model that only understands TRUE/FALSE is not guaranteed to fail
cleanly and may simply be ignored. Callers must know which scheme their target model
expects before choosing a value here.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThinking disabled, for models using the boolean on/off scheme.High thinking effort, for models using the graded-level scheme.Lowest thinking effort, for models using the graded-level scheme.Maximum thinking effort, for models using the graded-level scheme.Moderate thinking effort, for models using the graded-level scheme.Thinking enabled, for models using the boolean on/off scheme. -
Method Summary
Modifier and TypeMethodDescriptionstatic OllamaObject.ThinkingResolves aOllamaObject.Thinkingconstant from its raw string value.getValue()Returns the raw string form of this tier, as expected by Ollama'sthinkrequest field.booleanTrue if this constant belongs to the boolean on/off scheme, false if it's a graded level.voidstatic OllamaObject.ThinkingReturns the enum constant of this class with the specified name.static OllamaObject.Thinking[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRUE
Thinking enabled, for models using the boolean on/off scheme. -
FALSE
Thinking disabled, for models using the boolean on/off scheme. -
LOW
Lowest thinking effort, for models using the graded-level scheme. -
MEDIUM
Moderate thinking effort, for models using the graded-level scheme. -
HIGH
High thinking effort, for models using the graded-level scheme. -
MAX
Maximum thinking effort, for models using the graded-level scheme.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isBoolean
public boolean isBoolean()True if this constant belongs to the boolean on/off scheme, false if it's a graded level. -
putInto
-
getValue
Returns the raw string form of this tier, as expected by Ollama'sthinkrequest field.- Returns:
- the raw value, e.g.
"true"or"high"
-
fromValue
Resolves aOllamaObject.Thinkingconstant from its raw string value.Matching is case-insensitive; the input is lowercased before comparison.
- Parameters:
value- the raw value to resolve, e.g."true"or"HIGH"- Returns:
- the matching
OllamaObject.Thinkingconstant - Throws:
IllegalArgumentException- if no constant matches the given value
-