alanchen1115 commited on
Commit
4e57a38
·
verified ·
1 Parent(s): 172d1c7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -234,13 +234,13 @@ def handle_message(event):
234
  if previous_message["type"] == "image":
235
  image_path = previous_message["content"]
236
  agent_input = {
237
- "input": f"這是一張圖片在 {image_path},請根據圖片和回答以下問題:{user_text}"
238
  }
239
  # 清除上一則圖片訊息,避免重複觸發
240
  user_message_history[user_id].pop()
241
  else:
242
  agent_input = {"input": user_text}
243
-
244
  try:
245
  # 運行代理人
246
  response = agent_executor.invoke(agent_input)
 
234
  if previous_message["type"] == "image":
235
  image_path = previous_message["content"]
236
  agent_input = {
237
+ "input": f"這是一張圖片在 {image_path},請根據圖片回答以下問題:{user_text}"
238
  }
239
  # 清除上一則圖片訊息,避免重複觸發
240
  user_message_history[user_id].pop()
241
  else:
242
  agent_input = {"input": user_text}
243
+ print(agent_input)
244
  try:
245
  # 運行代理人
246
  response = agent_executor.invoke(agent_input)