Update app.py
Browse files
app.py
CHANGED
|
@@ -65,9 +65,9 @@ def _send_confirm_dialog(user_id, reply_token, feature, recognized, original_inp
|
|
| 65 |
))
|
| 66 |
|
| 67 |
def _do_photo_query(user_id, reply_token, product_name):
|
| 68 |
-
text_prompt = f"請幫我查詢「{product_name}」這款產品在台灣
|
| 69 |
try:
|
| 70 |
-
line_bot_api.reply_message(reply_token, TextSendMessage(text="✨ 精靈正在幫您查詢,請稍候..."))
|
| 71 |
response = model.generate_content(text_prompt)
|
| 72 |
line_bot_api.push_message(user_id, TextSendMessage(text=f"🧚♀️ 查詢成功!\n\n{response.text}"))
|
| 73 |
except Exception as e:
|
|
|
|
| 65 |
))
|
| 66 |
|
| 67 |
def _do_photo_query(user_id, reply_token, product_name):
|
| 68 |
+
text_prompt = f"請幫我查詢「{product_name}」這款產品在台灣藥妝店的合理售價範圍與推薦購買商家。請簡單溫柔地回答,並條列出品名、價格、商家。"
|
| 69 |
try:
|
| 70 |
+
line_bot_api.reply_message(reply_token, TextSendMessage(text="✨ 收到文字!精靈正在幫您查詢這款產品,請稍候..."))
|
| 71 |
response = model.generate_content(text_prompt)
|
| 72 |
line_bot_api.push_message(user_id, TextSendMessage(text=f"🧚♀️ 查詢成功!\n\n{response.text}"))
|
| 73 |
except Exception as e:
|