Jinja templates: fix a potential small bug

This commit is contained in:
oobabooga 2023-12-13 10:19:39 -08:00
parent 7f1a6a70e3
commit fcf5512364

View File

@ -827,7 +827,7 @@ def jinja_template_from_old_format(params, verbose=False):
result = result.replace('<|PRE-USER|>', pre_user)
result = result.replace('<|POST-USER|>', post_user)
result = result.replace('<|PRE-ASSISTANT|>', pre_assistant)
result = result.replace('<|PRE-ASSISTANT-GENERATE|>', pre_assistant.strip())
result = result.replace('<|PRE-ASSISTANT-GENERATE|>', pre_assistant.rstrip(' '))
result = result.replace('<|POST-ASSISTANT|>', post_assistant)
result = result.strip()