server: fix/test add_generation_prompt (#13770)
Co-authored-by: ochafik <ochafik@google.com>
This commit is contained in:
parent
4032ca4066
commit
d785f9c1fd
2 changed files with 26 additions and 0 deletions
|
@ -731,6 +731,7 @@ static json oaicompat_chat_params_parse(
|
|||
inputs.grammar = grammar;
|
||||
inputs.use_jinja = opt.use_jinja;
|
||||
inputs.parallel_tool_calls = json_value(body, "parallel_tool_calls", false);
|
||||
inputs.add_generation_prompt = json_value(body, "add_generation_prompt", true);
|
||||
inputs.reasoning_format = opt.reasoning_format;
|
||||
if (!inputs.tools.empty() && inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_NONE && body.contains("grammar")) {
|
||||
throw std::runtime_error("Cannot use custom grammar constraints with tools.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue