alanchen1115 commited on
Commit
60d886f
·
verified ·
1 Parent(s): 1700046

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -155,7 +155,7 @@ def analyze_image_with_text(image_path: str, user_text: str) -> str:
155
 
156
  response = chat_model.invoke([
157
  {"role": "user", "content": [
158
- {"type": "image_url", "image_url": {"url": f"file://{image_path}"}},
159
  {"type": "text", "text": user_text}
160
  ]}
161
  ])
 
155
 
156
  response = chat_model.invoke([
157
  {"role": "user", "content": [
158
+ {"type": "image", "source_type": "url", "url": f"file://{image_path}"},
159
  {"type": "text", "text": user_text}
160
  ]}
161
  ])