summaryrefslogtreecommitdiff
path: root/examples/server
diff options
context:
space:
mode:
authorAdithyanI <adithyan.i4internet@gmail.com>2023-12-17 15:57:56 +0100
committerGitHub <noreply@github.com>2023-12-17 16:57:56 +0200
commit8edd2b40fdbcafbf630f2cf29306b29d5cb48c42 (patch)
tree0e555896f86f5e7316c855d2889296fe43342279 /examples/server
parenteb16dae7e70ca97396190698b29c0f9ee3388e88 (diff)
server : fix grammar being ignored (#4494)
Fix bug in identifying the grammar.
Diffstat (limited to 'examples/server')
-rw-r--r--examples/server/server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/server/server.cpp b/examples/server/server.cpp
index be7b5b95..c97efe97 100644
--- a/examples/server/server.cpp
+++ b/examples/server/server.cpp
@@ -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());
}