Skip to content

Commit

Permalink
server : fix grammar being ignored (ggerganov#4494)
Browse files Browse the repository at this point in the history
Fix bug in identifying the grammar.
  • Loading branch information
AdithyanI authored Dec 17, 2023
1 parent eb16dae commit 8edd2b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 8edd2b4

Please sign in to comment.