mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	server: fix "--grammar-file" parameter (#12285)
This commit is contained in:
		| @@ -621,7 +621,9 @@ static json oaicompat_completion_params_parse( | ||||
|  | ||||
|     llama_params["chat_format"]      = static_cast<int>(chat_params.format); | ||||
|     llama_params["prompt"]           = chat_params.prompt; | ||||
|     llama_params["grammar"]          = chat_params.grammar; | ||||
|     if (!chat_params.grammar.empty()) { | ||||
|         llama_params["grammar"] = chat_params.grammar; | ||||
|     } | ||||
|     llama_params["grammar_lazy"]     = chat_params.grammar_lazy; | ||||
|     auto grammar_triggers = json::array(); | ||||
|     for (const auto & trigger : chat_params.grammar_triggers) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Victor
					Victor