]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : fix grammar commandline args (#21543)
authorAUTOMATIC1111 <redacted>
Thu, 9 Apr 2026 07:16:54 +0000 (10:16 +0300)
committerGitHub <redacted>
Thu, 9 Apr 2026 07:16:54 +0000 (10:16 +0300)
Co-authored-by: AUTOMATIC <->
tools/server/server-task.cpp

index 856b3f0e7e209b65eea281139438f71fb1100358..6a06171d7640e6e4ffb2f72a29f276bb6877470a 100644 (file)
@@ -384,6 +384,8 @@ task_params server_task::params_from_json_cmpl(
             throw std::runtime_error(std::string("\"json_schema\": ") + e.what());
         }
     } else {
+        params.sampling.grammar = defaults.sampling.grammar;
+
         std::string grammar_str = json_value(data, "grammar", std::string());
         if (!grammar_str.empty()) {
             // grammar_type key is set by the server when converting chat template grammars