Record Class Qwen3ChatTemplate.Variant
java.lang.Object
java.lang.Record
smile.llm.template.Qwen3ChatTemplate.Variant
- Record Components:
reasoningEffort- renders the reasoning-effort system instructions while thinking is on.thinkingDefaultOn- thinking is on unlessenable_thinkingis false (otherwise: only when true).honorPreserveThinking- assistant turns before the last user query keep their think block unlesspreserve_thinkingis false (otherwise: only turns after that query do).splitThinkFromContent- a</think>inside assistant content is split into reasoning and answer.tojsonScalars- non-string tool arguments are rendered as JSON (otherwise only mappings and lists; scalars as Pythonstr()).
- Enclosing class:
Qwen3ChatTemplate
public static record Qwen3ChatTemplate.Variant(boolean reasoningEffort, boolean thinkingDefaultOn, boolean honorPreserveThinking, boolean splitThinkFromContent, boolean tojsonScalars)
extends Record
The behaviours in which the released Qwen3.x templates differ.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Qwen3ChatTemplate.VariantQwen3.5 (thinking by default).static final Qwen3ChatTemplate.VariantSmall Qwen3.5 models (thinking only when requested).static final Qwen3ChatTemplate.VariantQwen3.8. -
Constructor Summary
ConstructorsConstructorDescriptionVariant(boolean reasoningEffort, boolean thinkingDefaultOn, boolean honorPreserveThinking, boolean splitThinkFromContent, boolean tojsonScalars) Creates an instance of aVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Qwen3ChatTemplate.VariantReads the behaviours from the text of achat_template.jinja.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehonorPreserveThinkingrecord component.booleanReturns the value of thereasoningEffortrecord component.booleanReturns the value of thesplitThinkFromContentrecord component.booleanReturns the value of thethinkingDefaultOnrecord component.booleanReturns the value of thetojsonScalarsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
QWEN3_8
Qwen3.8. -
QWEN3_5
Qwen3.5 (thinking by default). -
QWEN3_5_SMALL
Small Qwen3.5 models (thinking only when requested).
-
-
Constructor Details
-
Variant
public Variant(boolean reasoningEffort, boolean thinkingDefaultOn, boolean honorPreserveThinking, boolean splitThinkFromContent, boolean tojsonScalars) Creates an instance of aVariantrecord class.- Parameters:
reasoningEffort- the value for thereasoningEffortrecord componentthinkingDefaultOn- the value for thethinkingDefaultOnrecord componenthonorPreserveThinking- the value for thehonorPreserveThinkingrecord componentsplitThinkFromContent- the value for thesplitThinkFromContentrecord componenttojsonScalars- the value for thetojsonScalarsrecord component
-
-
Method Details
-
detect
Reads the behaviours from the text of achat_template.jinja.- Parameters:
jinja- the template source.- Returns:
- the variant.
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
reasoningEffort
public boolean reasoningEffort()Returns the value of thereasoningEffortrecord component.- Returns:
- the value of the
reasoningEffortrecord component
-
thinkingDefaultOn
public boolean thinkingDefaultOn()Returns the value of thethinkingDefaultOnrecord component.- Returns:
- the value of the
thinkingDefaultOnrecord component
-
honorPreserveThinking
public boolean honorPreserveThinking()Returns the value of thehonorPreserveThinkingrecord component.- Returns:
- the value of the
honorPreserveThinkingrecord component
-
splitThinkFromContent
public boolean splitThinkFromContent()Returns the value of thesplitThinkFromContentrecord component.- Returns:
- the value of the
splitThinkFromContentrecord component
-
tojsonScalars
public boolean tojsonScalars()Returns the value of thetojsonScalarsrecord component.- Returns:
- the value of the
tojsonScalarsrecord component
-