Force-disable parallel_tool_calls if template doesn't support it
This commit is contained in:
parent
caed1ef76f
commit
479918599b
1 changed files with 4 additions and 0 deletions
|
@ -640,6 +640,10 @@ static json oaicompat_completion_params_parse(
|
|||
inputs.tools = tools;
|
||||
inputs.tool_choice = tool_choice;
|
||||
inputs.parallel_tool_calls = json_value(body, "parallel_tool_calls", false);
|
||||
if (inputs.parallel_tool_calls && !tmpl.original_caps().supports_parallel_tool_calls) {
|
||||
LOG_DBG("Disabling parallel_tool_calls because the template does not support it");
|
||||
inputs.parallel_tool_calls = false;
|
||||
}
|
||||
inputs.stream = stream;
|
||||
// TODO: support mixing schema w/ tools beyond generic format.
|
||||
inputs.json_schema = json_value(llama_params, "json_schema", json());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue