Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d1d595

Browse filesBrowse files
committed
fixed formatting
1 parent 01b58b5 commit 2d1d595
Copy full SHA for 2d1d595

File tree

Expand file treeCollapse file tree

2 files changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-5
lines changed

‎common/chat.cpp

Copy file name to clipboardExpand all lines: common/chat.cpp
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,7 @@ static common_chat_params common_chat_templates_apply_jinja(
15931593
params.tool_choice = inputs.tool_choice;
15941594
params.grammar = inputs.grammar;
15951595

1596-
for(auto el: inputs.chat_template_kwargs)
1597-
{
1596+
for (auto el: inputs.chat_template_kwargs) {
15981597
params.extra_context[el.first] = json::parse(el.second);
15991598
}
16001599

‎examples/server/utils.hpp

Copy file name to clipboardExpand all lines: examples/server/utils.hpp
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,7 @@ static json oaicompat_completion_params_parse(
641641
inputs.add_generation_prompt = json_value(body, "add_generation_prompt", true);
642642

643643
auto chat_template_kwargs_object = json_value(body, "chat_template_kwargs", json::object());
644-
for (const auto & item: default_template_kwargs)
645-
{
644+
for (const auto & item: default_template_kwargs) {
646645
inputs.chat_template_kwargs[item.first] = item.second;
647646
}
648647
for (const auto & item : chat_template_kwargs_object.items()) {
@@ -666,7 +665,7 @@ static json oaicompat_completion_params_parse(
666665
throw std::runtime_error("Cannot have 2 or more assistant messages at the end of the list.");
667666
}
668667

669-
if(inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
668+
if (inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
670669
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
671670
}
672671

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.