11diff --git a/common/chat.cpp b/common/chat.cpp
2- index 60805ab3b..ecdd0bbb7 100644
2+ index 316bd2417..bb97ac3a6 100644
33--- a/common/chat.cpp
44+++ b/common/chat.cpp
55@@ -502,6 +502,13 @@ void common_chat_templates_free(struct common_chat_templates * tmpls) {
@@ -16,7 +16,7 @@ index 60805ab3b..ecdd0bbb7 100644
1616 bool common_chat_templates_was_explicit(const struct common_chat_templates * tmpls) {
1717 return tmpls->has_explicit_template;
1818 }
19- @@ -1857 ,6 +1864 ,83 @@ static common_chat_params common_chat_templates_apply_jinja(
19+ @@ -1982 ,6 +1989 ,83 @@ static common_chat_params common_chat_templates_apply_jinja(
2020 return common_chat_params_init_generic(tmpl, params);
2121 }
2222
@@ -100,7 +100,7 @@ index 60805ab3b..ecdd0bbb7 100644
100100 // Legacy template route (adhoc C++ implementation of known templates), forward to llama_chat_apply_template.
101101 static common_chat_params common_chat_templates_apply_legacy(
102102 const struct common_chat_templates * tmpls,
103- @@ -1915 ,6 +1999 ,17 @@ static common_chat_params common_chat_templates_apply_legacy(
103+ @@ -2041 ,6 +2125 ,17 @@ static common_chat_params common_chat_templates_apply_legacy(
104104 return params;
105105 }
106106
@@ -118,7 +118,7 @@ index 60805ab3b..ecdd0bbb7 100644
118118 common_chat_params common_chat_templates_apply(
119119 const struct common_chat_templates * tmpls,
120120 const struct common_chat_templates_inputs & inputs)
121- @@ -1980 ,7 +2075 ,7 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
121+ @@ -2109 ,7 +2204 ,7 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
122122 try {
123123 common_chat_parse(builder);
124124 } catch (const common_chat_msg_partial_exception & ex) {
@@ -127,7 +127,7 @@ index 60805ab3b..ecdd0bbb7 100644
127127 if (!is_partial) {
128128 builder.clear_tools();
129129 builder.move_to(0);
130- @@ -1988 ,8 +2083 ,8 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
130+ @@ -2117 ,8 +2212 ,8 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
131131 }
132132 }
133133 auto msg = builder.result();
@@ -140,10 +140,10 @@ index 60805ab3b..ecdd0bbb7 100644
140140 return msg;
141141 }
142142diff --git a/common/chat.h b/common/chat.h
143- index b014f9f0a..f709ef596 100644
143+ index eb628d8bc..a80089c1b 100644
144144--- a/common/chat.h
145145+++ b/common/chat.h
146- @@ -167 ,10 +167 ,15 @@ common_chat_templates_ptr common_chat_templates_init(
146+ @@ -168 ,10 +168 ,15 @@ common_chat_templates_ptr common_chat_templates_init(
147147 const std::string & bos_token_override = "",
148148 const std::string & eos_token_override = "");
149149
0 commit comments