Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -466,7 +466,7 @@ def callback():
|
|
| 466 |
# 這裡應該要有 medicine_name 的來源,通常是 user_states 或請用戶再輸入
|
| 467 |
medicine_name = user_states.get(user_id, {}).get('medicine')
|
| 468 |
if not medicine_name:
|
| 469 |
-
reply_text = "請輸入要查詢的藥品名稱
|
| 470 |
else:
|
| 471 |
medicine_name = medicine_name.strip().lower()
|
| 472 |
conn = sqlite3.connect(DB_PATH)
|
|
@@ -516,7 +516,7 @@ def callback():
|
|
| 516 |
|
| 517 |
#圖片查詢
|
| 518 |
elif user_input == "圖片查詢":
|
| 519 |
-
reply_text = "請
|
| 520 |
reply_request = ReplyMessageRequest(
|
| 521 |
reply_token=event.reply_token,
|
| 522 |
messages=[TextMessage(text=reply_text)]
|
|
|
|
| 466 |
# 這裡應該要有 medicine_name 的來源,通常是 user_states 或請用戶再輸入
|
| 467 |
medicine_name = user_states.get(user_id, {}).get('medicine')
|
| 468 |
if not medicine_name:
|
| 469 |
+
reply_text = "請輸入要查詢的藥品名稱:"
|
| 470 |
else:
|
| 471 |
medicine_name = medicine_name.strip().lower()
|
| 472 |
conn = sqlite3.connect(DB_PATH)
|
|
|
|
| 516 |
|
| 517 |
#圖片查詢
|
| 518 |
elif user_input == "圖片查詢":
|
| 519 |
+
reply_text = "請傳送藥品圖片:"
|
| 520 |
reply_request = ReplyMessageRequest(
|
| 521 |
reply_token=event.reply_token,
|
| 522 |
messages=[TextMessage(text=reply_text)]
|