Skip to content

Commit 2b55c8b

Browse files
committedMar 19, 2025
Fix
1 parent 98a9291 commit 2b55c8b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎hello.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print('Hello, World!')

‎main.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ def action_round(chat_history: list, action_cback: dict):
103103
if __name__ == '__main__':
104104
while True:
105105
user_input = input("User >> ")
106-
result = round_chat(chat_history, user_input)
106+
try:
107+
result = round_chat(chat_history, user_input)
108+
except KeyError:
109+
print("检查你的配置信息/网络连接是否正确!")
110+
except Exception as e:
111+
print("发生错误,请联系作者!")
112+
print(e)
107113
if "</think>" in result["chat_history"][-1]["content"]:
108114
print("Assistant >> " + result["chat_history"][-1]["content"].split("</think>")[1])
109115
else:

0 commit comments

Comments
 (0)