Skip to content

Commit 54e6c88

Browse files
committed
Merge branch 'avx_opt' of https://github.com/netrunnereve/llama.cpp into avx_opt
2 parents ec6366f + 8c29230 commit 54e6c88

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/llama.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21799,8 +21799,11 @@ static int32_t llama_chat_apply_template_internal(
2179921799
// IBM Granite template
2180021800
for (const auto & message : chat) {
2180121801
std::string role(message->role);
21802-
ss << "<|start_of_role|>" << role << "<|end_of_role|>"
21803-
<< message->content << "<|end_of_text|>\n";
21802+
ss << "<|start_of_role|>" << role << "<|end_of_role|>";
21803+
if (role == "assistant_tool_call") {
21804+
ss << "<|tool_call|>";
21805+
}
21806+
ss << message->content << "<|end_of_text|>\n";
2180421807
}
2180521808
if (add_ass) {
2180621809
ss << "<|start_of_role|>assistant<|end_of_role|>\n";

0 commit comments

Comments
 (0)