Package net.thevpc.naru.api.model
Class NaruThinkingTags
java.lang.Object
net.thevpc.naru.api.model.NaruThinkingTags
- All Implemented Interfaces:
NToElement
The delimiters a model wraps its reasoning in, when it puts reasoning in the
answer text instead of a field of its own.
There is no standard for this. One vendor emits <think>, another
<reasoning>, a third relies on a tool call. A model configured through
a custom or generic provider may use anything, so the pair is configurable and
the protocol supplies a default.
NATIVE_ONLY exists for models that do not delimit reasoning at
all: parsing tags on those is not merely useless but actively harmful, since
a model that happens to discuss <think> in its answer would have that
text silently removed from the user's view.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NaruThinkingTagsDo not split reasoning out of the answer text; expect it only as a provider-native field, and if none arrives there is no reasoning to show. -
Method Summary
Modifier and TypeMethodDescriptioncloseTag()booleaninthashCode()booleanBuilds a parser configured with this pair, or null when tag parsing is off because the model uses a native reasoning channel instead.static NaruThinkingTagsstatic NaruThinkingTagsopenTag()toString()
-
Field Details
-
NATIVE_ONLY
Do not split reasoning out of the answer text; expect it only as a provider-native field, and if none arrives there is no reasoning to show.
-
-
Method Details
-
of
-
of
-
isEnabled
public boolean isEnabled() -
openTag
-
closeTag
-
newParser
Builds a parser configured with this pair, or null when tag parsing is off because the model uses a native reasoning channel instead. -
toElement
- Specified by:
toElementin interfaceNToElement
-
equals
-
hashCode
public int hashCode() -
toString
-