Skip to main content

Python class

ParsedReasoningDelta

ParsedReasoningDelta​

class max.interfaces.ParsedReasoningDelta(span, is_still_reasoning, reasoning_text_formatter=None)

source

Bases: object

Result of applying reasoning parsing to a streaming delta chunk.

Parameters:

span​

span

source

The ReasoningSpan identifying the reasoning portion of the chunk.

Type:

max.interfaces.reasoning.ReasoningSpan

is_still_reasoning​

is_still_reasoning

source

Whether the reasoning section is still active.

Type:

bool

reasoning_text_formatter​

reasoning_text_formatter

source

Optional callback to post-process decoded reasoning text. Returns the formatted text, or None if the text should be ignored.

Type:

collections.abc.Callable[[str], str | None] | None

is_still_reasoning​

is_still_reasoning: bool

source

reasoning_text_formatter​

reasoning_text_formatter: Callable[[str], str | None] | None = None

source

span​

span: ReasoningSpan

source