[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-03-07 15:44:08 +00:00 committed by Daniel Han
commit 661194623e

View file

@ -665,9 +665,13 @@ def _fix_chat_template(chat_template):
and "<|im_start|>" in chat_template
):
after_endfor = (
"{%" + dash + " if add_generation_prompt %}"
"{%"
+ dash
+ " if add_generation_prompt %}"
+ "{{ '<|im_start|>assistant\n' }}"
+ "{%" + dash + " endif %}"
+ "{%"
+ dash
+ " endif %}"
)
chat_template = chat_template[: where + len(chosen_end)] + after_endfor
return chat_template