This commit is contained in:
Colin 2024-01-21 22:43:16 +08:00
parent 17a2df2e6f
commit 5dbac40925
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class ResearchRunner(QwenRunner):
runner = ResearchRunner(model)
# 第一轮对话
response, history, decode_tokens = runner.Chat(tokenizer, "东南亚国家日本的首都是什么市", "")
response, history, decode_tokens = runner.Chat(tokenizer, "东南亚国家日本的首都是什么市", "日本的首都是")
print(decode_tokens)
# <|im_start|>system
# You are a helpful assistant.<|im_end|>
@ -71,6 +71,6 @@ print(decode_tokens)
# <|im_start|>assistant
# 日本的首都东京。<|im_end|>
# <|endoftext|>
# 日本的首都是东京。<|im_end|>
if decode_tokens.split("\n")[-2] != """日本的首都东京。<|im_end|>""":
raise ()