mirror of https://github.com/THUDM/ChatGLM-6B
Merge pull request #322 from ronething/patch-1
chore(cli_demo): strip the query input for `stop` or `clear` commandpull/328/head
commit
534e5f1a6e
|
@ -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…
Reference in New Issue