Skip to content

vllm.parser.ripple

Ricursive Ripple parser for reasoning and tool calls.

Ripple decides per turn whether to think; the generation prompt does not open <think>. Tool calls are JSON objects in Hermes-style tags::

<think>
...reasoning...
</think>
...content...
<tool_call>
{"name": "get_weather", "arguments": {"city": "Paris"}}
</tool_call>

The markers are plain text, not special tokens.

_framed(marker, before=True, after=True)

Spellings of marker with its optional framing newlines, longest first.