We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e8a9a commit b8deef0Copy full SHA for b8deef0
src/llama.cpp
@@ -21799,8 +21799,11 @@ static int32_t llama_chat_apply_template_internal(
21799
// IBM Granite template
21800
for (const auto & message : chat) {
21801
std::string role(message->role);
21802
- ss << "<|start_of_role|>" << role << "<|end_of_role|>"
21803
- << message->content << "<|end_of_text|>\n";
+ ss << "<|start_of_role|>" << role << "<|end_of_role|>";
+ if (role == "assistant_tool_call") {
21804
+ ss << "<|tool_call|>";
21805
+ }
21806
+ ss << message->content << "<|end_of_text|>\n";
21807
}
21808
if (add_ass) {
21809
ss << "<|start_of_role|>assistant<|end_of_role|>\n";
0 commit comments