Table of Contents

Property Grammar

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

Grammar

Grammar rules used to constrain model output (e.g., to produce valid JSON). When set to non-null, repetition penalties are disabled by default to prevent conflicts. Incompatibility: Grammar and tool-calls cannot be used together. If any tool is registered in Tools while Grammar is non-null, Submit(string, CancellationToken) throws InvalidOperationException.

public Grammar Grammar { get; set; }

Property Value

Grammar