Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions extension/llm/runner/irunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ struct GenerationConfig {
// Whether to echo the input prompt in the output
bool echo = true;

// Grammar definition for constrained decoding (e.g. a JSON schema, regex,
// Lark CFG, or GBNF grammar). Empty string means no constraint.
std::string grammar;

// Grammar format: "json_schema", "regex", "lark", or "gbnf".
// Only used when grammar is non-empty.
std::string grammar_type;
Comment on lines +38 to +42
Comment on lines +38 to +42

// Whether to ignore EOS token and continue generating until max_new_tokens
bool ignore_eos = false;

Expand Down
Loading