Skip to content

Commit cdc3cbe

Browse files
committed
simplify code
1 parent 74f6060 commit cdc3cbe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/server/utils.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,10 +749,9 @@ static json oaicompat_chat_params_parse(
749749
llama_params["parse_tool_calls"] = true;
750750
}
751751

752+
// merge the template args provided from command line with the args provided in the user request
752753
auto chat_template_kwargs_object = json_value(body, "chat_template_kwargs", json::object());
753-
for (const auto & item : opt.chat_template_kwargs) {
754-
inputs.chat_template_kwargs[item.first] = item.second;
755-
}
754+
inputs.chat_template_kwargs = opt.chat_template_kwargs;
756755
for (const auto & item : chat_template_kwargs_object.items()) {
757756
inputs.chat_template_kwargs[item.key()] = item.value().dump();
758757
}

0 commit comments

Comments
 (0)