Merge pull request #322 from ronething/patch-1

chore(cli_demo): strip the query input for `stop` or `clear` command
pull/328/head
Zhengxiao Du 2 years ago committed by GitHub
commit 534e5f1a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,9 +31,9 @@ def main():
print("欢迎使用 ChatGLM-6B 模型输入内容即可进行对话clear 清空对话历史stop 终止程序")
while True:
query = input("\n用户:")
if query == "stop":
if query.strip() == "stop":
break
if query == "clear":
if query.strip() == "clear":
history = []
os.system(clear_command)
print("欢迎使用 ChatGLM-6B 模型输入内容即可进行对话clear 清空对话历史stop 终止程序")

Loading…
Cancel
Save