Table of Contents

Property Content

Namespace
LMKit.TextGeneration
Assembly
LM-Kit.NET.dll

Content

Gets the user-visible portion of the generated text.

public string Content { get; }

Property Value

string

Examples

Reading the user-facing answer separately from the model's internal reasoning:

using LMKit.Model;
using LMKit.TextGeneration;
using LMKit.TextGeneration.Chat;

using var model = LM.LoadFromModelID("qwen3:8b"); using var chat = new MultiTurnConversation(model) { ReasoningLevel = ReasoningLevel.Medium // model emits a <think> block };

TextGenerationResult result = chat.Submit("What is 2 + 2?");

Console.WriteLine("Answer: " + result.Content); // "4" Console.WriteLine("Full transcript including reasoning:"); Console.WriteLine(result.Completion); // "<think>...</think> 4"

Remarks

Reconstructed from the underlying assistant message's Segments by concatenating only segments whose SegmentType is UserVisible. The runtime is the single source of truth for segment classification (assigned by LMKit.TextGeneration.Chat.ChatTemplate-driven detection during generation), so this property reflects exactly what the model emitted as user-facing output - no regex parsing, no template-specific token fallback.

Equal to Completion when the model produced no reasoning (e.g. when the agent layer disabled reasoning). When reasoning was emitted, Completion still contains the full <think>...</think> (or template-equivalent) block, while Content contains only the user-facing answer.

Share