Python class
ParsedReasoningDelta
ParsedReasoningDeltaβ
class max.interfaces.ParsedReasoningDelta(span, is_still_reasoning, reasoning_text_formatter=None)
Bases: object
Result of applying reasoning parsing to a streaming delta chunk.
-
Parameters:
-
- span (ReasoningSpan)
- is_still_reasoning (bool)
- reasoning_text_formatter (Callable[[str], str | None] | None)
spanβ
span
The ReasoningSpan identifying the reasoning portion
of the chunk.
is_still_reasoningβ
is_still_reasoning
Whether the reasoning section is still active.
-
Type:
reasoning_text_formatterβ
reasoning_text_formatter
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
reasoning_text_formatterβ
reasoning_text_formatter: Callable[[str], str | None] | None = None
spanβ
span: ReasoningSpan
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!