Update hf_engine.py

This commit is contained in:
hoshi-hiyouga 2024-05-20 00:30:45 +08:00 committed by GitHub
parent a1fa7aa63b
commit a943a1034b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class HuggingfaceEngine(BaseEngine):
messages[0]["content"] = "<image>" + messages[0]["content"]
paired_messages = messages + [{"role": "assistant", "content": ""}]
system = system or generating_args["default_system"]
prompt_ids, _ = template.encode_oneturn(
tokenizer=tokenizer, messages=paired_messages, system=system, tools=tools
)