Skip to content

Commit 9f3c214

Browse files
committed
fixed formatting
1 parent 05a893f commit 9f3c214

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

common/chat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,8 +1615,7 @@ static common_chat_params common_chat_templates_apply_jinja(
16151615
params.grammar = inputs.grammar;
16161616
params.now = inputs.now;
16171617

1618-
for(auto el: inputs.chat_template_kwargs)
1619-
{
1618+
for (auto el: inputs.chat_template_kwargs) {
16201619
params.extra_context[el.first] = json::parse(el.second);
16211620
}
16221621

tools/server/utils.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,7 @@ static json oaicompat_chat_params_parse(
760760
inputs.add_generation_prompt = json_value(body, "add_generation_prompt", true);
761761

762762
auto chat_template_kwargs_object = json_value(body, "chat_template_kwargs", json::object());
763-
for (const auto & item: default_template_kwargs)
764-
{
763+
for (const auto & item: default_template_kwargs) {
765764
inputs.chat_template_kwargs[item.first] = item.second;
766765
}
767766
for (const auto & item : chat_template_kwargs_object.items()) {
@@ -785,7 +784,7 @@ static json oaicompat_chat_params_parse(
785784
throw std::runtime_error("Cannot have 2 or more assistant messages at the end of the list.");
786785
}
787786

788-
if(inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
787+
if (inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
789788
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
790789
}
791790

0 commit comments

Comments
 (0)