fix cli_demo

Former-commit-id: c550987a72
This commit is contained in:
hiyouga
2024-01-20 23:27:10 +08:00
parent baaa0acdf1
commit 0be7b16955
4 changed files with 6 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ class ChatModel:
tools: Optional[str] = None,
**input_kwargs,
) -> Tuple[Dict[str, Any], int]:
messages += [{"role": "assistant", "content": ""}]
prompt, _ = self.template.encode_oneturn(
tokenizer=self.tokenizer, messages=messages, system=system, tools=tools
)