From ed7c2cb1f9d9d177df75e0176c6b31d64538daa7 Mon Sep 17 00:00:00 2001 From: AdithyanI Date: Sat, 16 Dec 2023 12:07:23 +0100 Subject: [PATCH] Update server.cpp Fix bug in identifying the grammar. --- examples/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 5f93dcb66..67a212f78 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2413,7 +2413,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()); }