mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-24 02:14:35 +00:00
server : fix grammar being ignored (#4494)
Fix bug in identifying the grammar.
This commit is contained in:
parent
eb16dae7e7
commit
8edd2b40fd
@ -2414,7 +2414,7 @@ json oaicompat_completion_params_parse(
|
||||
llama_params["ignore_eos"] = json_value(body, "ignore_eos", false);
|
||||
llama_params["tfs_z"] = json_value(body, "tfs_z", 0.0);
|
||||
|
||||
if (llama_params.count("grammar") != 0) {
|
||||
if (body.count("grammar") != 0) {
|
||||
llama_params["grammar"] = json_value(body, "grammar", json::object());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user