Evaaaaa06 commited on
Commit
c2051af
·
verified ·
1 Parent(s): e61a4ad

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -155,7 +155,7 @@ def analyze_with_openai(image_path, user_text):
155
  return response["choices"][0]["message"]["content"]
156
 
157
 
158
- @line_handler.add(MessageEvent, message=(TextMessage, ImageMessage))
159
  def handle_image_message(event):
160
  # 從 LINE API 獲取圖片數據
161
  image_path = get_image_url(event.message.id)
 
155
  return response["choices"][0]["message"]["content"]
156
 
157
 
158
+ @line_handler.add(MessageEvent, message=ImageMessage)
159
  def handle_image_message(event):
160
  # 從 LINE API 獲取圖片數據
161
  image_path = get_image_url(event.message.id)