Commit 6ba580bf by nzy

Fix quit & add waiting info

parent 8092a6c6
...@@ -70,6 +70,8 @@ while not is_correct: ...@@ -70,6 +70,8 @@ while not is_correct:
break break
else: else:
continue continue
else:
break
fun_name = fun_select(anpl, logger, cmd == "1" or cmd == "2") fun_name = fun_select(anpl, logger, cmd == "1" or cmd == "2")
if cmd == "1": if cmd == "1":
......
...@@ -32,7 +32,7 @@ while not is_correct: ...@@ -32,7 +32,7 @@ while not is_correct:
history.append(new_message) history.append(new_message)
logger.log("user", "chat", new_message) logger.log("user", "chat", new_message)
system_info("Waiting for ChatGPT...")
try: try:
res = raw_query(history, model="gpt-3.5-turbo", max_tokens=1024, n=1, temperature=0) res = raw_query(history, model="gpt-3.5-turbo", max_tokens=1024, n=1, temperature=0)
except Exception as e: except Exception as e:
...@@ -88,5 +88,7 @@ while not is_correct: ...@@ -88,5 +88,7 @@ while not is_correct:
if Confirm.ask(sys_str + "Less than 30 minutes. Do you really want to exit?"): if Confirm.ask(sys_str + "Less than 30 minutes. Do you really want to exit?"):
logger.log("user", "quit", "force") logger.log("user", "quit", "force")
break break
else:
break
logger.log("system", "exit", str(is_correct)) logger.log("system", "exit", str(is_correct))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment