Table of Contents

Property ParseSucceeded

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

ParseSucceeded

Gets a value indicating whether the model's answer could be read as the requested structure.

public bool ParseSucceeded { get; }

Property Value

bool

Examples

var result = extractor.Parse();
if (!result.ParseSucceeded)
{
    Console.WriteLine($"Unreadable answer: {result.ParseError}");
}

Remarks

When the completion is not valid JSON (a truncated answer, prose around the object, a malformed literal), every element is reported as null and Json still serializes a well-formed object. Without this flag such a run is indistinguishable from an honest "nothing found": a caller would tell its user that the document holds no value where in fact the answer was never read. Check it before trusting an all-null result; ParseError carries the reason.

Share