Skip to content

Commit d44d099

Browse files
matteoservamatteo
authored and
matteo
committed
fixed formatting
1 parent 38ecf87 commit d44d099

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
@@ -1595,8 +1595,7 @@ static common_chat_params common_chat_templates_apply_jinja(
15951595
params.tool_choice = inputs.tool_choice;
15961596
params.grammar = inputs.grammar;
15971597

1598-
for(auto el: inputs.chat_template_kwargs)
1599-
{
1598+
for (auto el: inputs.chat_template_kwargs) {
16001599
params.extra_context[el.first] = json::parse(el.second);
16011600
}
16021601

tools/server/utils.hpp

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

719719
auto chat_template_kwargs_object = json_value(body, "chat_template_kwargs", json::object());
720-
for (const auto & item: default_template_kwargs)
721-
{
720+
for (const auto & item: default_template_kwargs) {
722721
inputs.chat_template_kwargs[item.first] = item.second;
723722
}
724723
for (const auto & item : chat_template_kwargs_object.items()) {
@@ -742,7 +741,7 @@ static json oaicompat_completion_params_parse(
742741
throw std::runtime_error("Cannot have 2 or more assistant messages at the end of the list.");
743742
}
744743

745-
if(inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
744+
if (inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
746745
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
747746
}
748747

0 commit comments

Comments
 (0)