We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb31f08 commit 76f5d27Copy full SHA for 76f5d27
examples/server/utils.hpp
@@ -601,7 +601,7 @@ static json oaicompat_completion_params_parse(
601
inputs.use_jinja = use_jinja;
602
inputs.parallel_tool_calls = json_value(body, "parallel_tool_calls", false);
603
inputs.extract_reasoning = reasoning_format != COMMON_REASONING_FORMAT_NONE;
604
- if (inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_NONE && llama_params.contains("grammar")) {
+ if (!inputs.tools.empty() && inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_NONE && llama_params.contains("grammar")) {
605
throw std::runtime_error("Cannot use custom grammar constraints with tools.");
606
}
607
0 commit comments