Skip to content
1 min read · 65 words

Function: makeGemmaChannelReasoningParser()

ts
function makeGemmaChannelReasoningParser(
  opts?: ReasoningParserOptions,
): ReasoningParserFn;

Defined in: src/batteries/llm/chat_common/reasoning_parsers.ts:250

Parse Gemma E2B/E4B reasoning emitted on the thought channel: <|channel>thought\n…<channel|>. Targets the E2B/E4B delimited form (the transformers.js-runnable one). Reasoning is only emitted when <|think|> is injected into the system prompt. Unpaired markers are recovered by default — see ReasoningParserOptions.

Parameters

ParameterType
optsReasoningParserOptions

Returns

ReasoningParserFn