Skip to content

Commit 839cf4c

Browse files
authored
Fix spacing
1 parent 50ef6ca commit 839cf4c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/llama.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21714,16 +21714,16 @@ static int32_t llama_chat_apply_template_internal(
2171421714
}
2171521715
}
2171621716
} else if (tmpl == "granite" || tmpl_contains("<|start_of_role|>")) {
21717-
// IBM Granite template
21718-
for (const auto & message : chat) {
21719-
std::string role(message->role);
21720-
ss << "<|start_of_role|>" << role << "<|end_of_role|>"
21721-
<< message->content << "<|end_of_text|>\n";
21722-
}
21723-
if (add_ass) {
21724-
ss << "<|start_of_role|>assistant<|end_of_role|>\n";
21725-
}
21726-
} else {
21717+
// IBM Granite template
21718+
for (const auto & message: chat) {
21719+
std::string role(message -> role);
21720+
ss << "<|start_of_role|>" << role << "<|end_of_role|>"
21721+
<< message -> content << "<|end_of_text|>\n";
21722+
}
21723+
if (add_ass) {
21724+
ss << "<|start_of_role|>assistant<|end_of_role|>\n";
21725+
}
21726+
} else {
2172721727
// template not supported
2172821728
return -1;
2172921729
}

0 commit comments

Comments
 (0)