[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
334848d8d8
commit
661194623e
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue