diff --git a/include/minja/chat-template.hpp b/include/minja/chat-template.hpp index b53e08f..93f96fe 100644 --- a/include/minja/chat-template.hpp +++ b/include/minja/chat-template.hpp @@ -197,7 +197,7 @@ class chat_template { || contains(out_str, "\"argument_needle\":") || contains(out_str, "'argument_needle':") || contains(out_str, ">argument_needle<") - || contains(out_str, ""); + || contains(out_str, "=\"argument_needle\""); }; // Note: the arguments are rendered in both cases, but may be double-escaped, which we don't want.