Skip to main content

Module reasoning

Module reasoning 

Source
Expand description

Shared parsing for model outputs that carry <think> reasoning blocks.

Structs§

ParsedReasoningResponse

Constants§

THINK_END_TAG
THINK_START_TAG

Functions§

has_unclosed_thinking_block
parse_reasoning_response
parse_reasoning_response_for_prompt
parse_reasoning_response_started_in_think
Parse generated text when the rendered prompt already opened <think>. Some reasoning templates emit only the closing tag in generated text.