Record Class ThinkOption.ThinkLevel
java.lang.Object
java.lang.Record
org.springframework.ai.ollama.api.ThinkOption.ThinkLevel
- Record Components:
level- the thinking level: "low", "medium", or "high"
- All Implemented Interfaces:
ThinkOption
- Enclosing interface:
ThinkOption
String-level think option for the GPT-OSS model which requires explicit levels.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.ai.ollama.api.ThinkOption
ThinkOption.ThinkBoolean, ThinkOption.ThinkLevel, ThinkOption.ThinkOptionDeserializer, ThinkOption.ThinkOptionSerializer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ThinkOption.ThinkLevelHigh thinking level for GPT-OSS.static final ThinkOption.ThinkLevelLow thinking level for GPT-OSS.static final ThinkOption.ThinkLevelMedium thinking level for GPT-OSS. -
Constructor Summary
ConstructorsConstructorDescriptionThinkLevel(String level) models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/ThinkOption.java Creates a new ThinkLevel with validation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.Converts this think option to its JSON representation.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LOW
Low thinking level for GPT-OSS. -
MEDIUM
Medium thinking level for GPT-OSS. -
HIGH
High thinking level for GPT-OSS.
-
-
Constructor Details
-
ThinkLevel
models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/ThinkOption.java Creates a new ThinkLevel with validation.
-
-
Method Details
-
toJsonValue
Description copied from interface:ThinkOptionConverts this think option to its JSON representation.- Specified by:
toJsonValuein interfaceThinkOption- Returns:
- the JSON value (Boolean or String)
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-