Companion

Constants and factory functions of LlamaGrammar.

Functions

Link copied to clipboard
fun gbnf(gbnf: String, root: String = "root"): LlamaGrammar

A raw GBNF grammar starting at root.

Link copied to clipboard

Constrains output to any JSON object.

Link copied to clipboard

Constrains output to JSON documents valid against the JSON Schema schema (JSON text).