server: fix "--grammar-file" parameter (#12285)
This commit is contained in:
parent
c522ce4143
commit
add2a3aa5a
1 changed files with 3 additions and 1 deletions
|
@ -621,7 +621,9 @@ static json oaicompat_completion_params_parse(
|
|||
|
||||
llama_params["chat_format"] = static_cast<int>(chat_params.format);
|
||||
llama_params["prompt"] = chat_params.prompt;
|
||||
if (!chat_params.grammar.empty()) {
|
||||
llama_params["grammar"] = chat_params.grammar;
|
||||
}
|
||||
llama_params["grammar_lazy"] = chat_params.grammar_lazy;
|
||||
auto grammar_triggers = json::array();
|
||||
for (const auto & trigger : chat_params.grammar_triggers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue