Package net.thevpc.naru.api.model
Enum Class NaruTokenKind
- All Implemented Interfaces:
Serializable,Comparable<NaruTokenKind>,Constable
Which part of a model call a token belongs to.
Split out because reasoning is billed and metered differently from visible output, and the difference is invisible if both are folded into one "completion" number: a long think followed by a one-line answer looks identical to a long answer, even though they cost very different amounts and mean very different things when read back from a session.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether tokens of this kind occupy the model's context window.booleanisBilled()Whether tokens of this kind are charged as model output.static NaruTokenKindReturns the enum constant of this class with the specified name.static NaruTokenKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.wireName()The wire/display name, matching the token-kind names providers use in their usage payloads.
-
Enum Constant Details
-
INPUT
Tokens the provider read: the system prompt, history, and tool results. -
OUTPUT
Tokens the model produced that the user sees as the answer. -
THINKING
Tokens the model spent reasoning before or instead of answering.Counted against consumption and limits, but kept separate from
OUTPUTso a transcript can show what the model actually thought rather than only what it said.
-
-
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
-
consumesContext
public boolean consumesContext()Whether tokens of this kind occupy the model's context window.All three do. Reasoning is not free: it is generated text, and it has to be carried back in on the following request, so a context budget that ignores it under-counts by however much the model thought.
-
isBilled
public boolean isBilled() -
wireName
The wire/display name, matching the token-kind names providers use in their usage payloads.
-