UseThinkingBlocks(MarkdownPipelineBuilder, ThinkingBlockOptions?) Method

Definition

Assembly MarkView.Avalonia.dll

Shows the reasoning a language model writes before its answer, between tags such as <think> and </think> (see TagNames), in a block that folds away. The reasoning is markdown. During a streaming session the block shows "Thinking…" and stays expanded until the closing tag arrives, then collapses under a title with the time it took; in any other document it starts collapsed. Each tag goes at the start of a line; the closing tag can also end the reasoning's last line. A block without its closing tag runs to the end of the document. Activate on the viewer with viewer.UseThinkingBlocks().

public static MarkdownPipelineBuilder UseThinkingBlocks(this MarkdownPipelineBuilder builder, ThinkingBlockOptions? options = null)

Parameters

builder
Markdig.MarkdownPipelineBuilder

The pipeline builder.

options
ThinkingBlockOptions

The tags, titles and fold behaviour; the defaults when null. Calling the method again replaces them.

Returns

Markdig.MarkdownPipelineBuilder