Update main.py
Browse files
main.py
CHANGED
|
@@ -91,8 +91,7 @@ def handle_message(event):
|
|
| 91 |
|
| 92 |
# 檢查是否正在與使用者交談
|
| 93 |
elif working_status:
|
| 94 |
-
|
| 95 |
-
#try:
|
| 96 |
# 取得使用者輸入的文字
|
| 97 |
prompt = event.message.text
|
| 98 |
# Combine the PDF contents and the new prompt into a single list for the 'contents' argument
|
|
@@ -107,7 +106,7 @@ def handle_message(event):
|
|
| 107 |
else:
|
| 108 |
# 回覆 "Gemini沒答案!請換個說法!"
|
| 109 |
out = "Gemini沒答案!請換個說法!"
|
| 110 |
-
|
| 111 |
# 處理錯誤
|
| 112 |
out = "Gemini執行出錯!請換個說法!"
|
| 113 |
|
|
|
|
| 91 |
|
| 92 |
# 檢查是否正在與使用者交談
|
| 93 |
elif working_status:
|
| 94 |
+
try:
|
|
|
|
| 95 |
# 取得使用者輸入的文字
|
| 96 |
prompt = event.message.text
|
| 97 |
# Combine the PDF contents and the new prompt into a single list for the 'contents' argument
|
|
|
|
| 106 |
else:
|
| 107 |
# 回覆 "Gemini沒答案!請換個說法!"
|
| 108 |
out = "Gemini沒答案!請換個說法!"
|
| 109 |
+
except:
|
| 110 |
# 處理錯誤
|
| 111 |
out = "Gemini執行出錯!請換個說法!"
|
| 112 |
|