Skip to content

Commit 5b1e6bc

Browse files
server : fix grammar commandline args (ggml-org#21543)
Co-authored-by: AUTOMATIC <->
1 parent a5edd31 commit 5b1e6bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/server/server-task.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ task_params server_task::params_from_json_cmpl(
384384
throw std::runtime_error(std::string("\"json_schema\": ") + e.what());
385385
}
386386
} else {
387+
params.sampling.grammar = defaults.sampling.grammar;
388+
387389
std::string grammar_str = json_value(data, "grammar", std::string());
388390
if (!grammar_str.empty()) {
389391
// grammar_type key is set by the server when converting chat template grammars

0 commit comments

Comments
 (0)