SamplerChain.grammar

Adds grammar-constrained sampling. grammarStr is a GBNF grammar; grammarRoot is the root rule name (usually "root").

struct SamplerChain
ref @trusted return
grammar
(
const(llama_vocab)* vocab
,
string grammarStr
,
string grammarRoot = "root"
)

Meta