We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35d48e6 commit 7355d7bCopy full SHA for 7355d7b
1 file changed
extension/llm/runner/irunner.h
@@ -33,6 +33,14 @@ struct GenerationConfig {
33
// Whether to echo the input prompt in the output
34
bool echo = true;
35
36
+ // Grammar definition for constrained decoding (e.g. a JSON schema, regex,
37
+ // Lark CFG, or GBNF grammar). Empty string means no constraint.
38
+ std::string grammar;
39
+
40
+ // Grammar format: "json_schema", "regex", "lark", or "gbnf".
41
+ // Only used when grammar is non-empty.
42
+ std::string grammar_type;
43
44
// Whether to ignore EOS token and continue generating until max_new_tokens
45
bool ignore_eos = false;
46
0 commit comments