Update tools.py
Browse files
tools.py
CHANGED
|
@@ -84,7 +84,7 @@ def encode_image_to_base64(image_path: str) -> tuple[str, str]:
|
|
| 84 |
except Exception as e:
|
| 85 |
raise Exception(f"Error encoding image: {e}")
|
| 86 |
|
| 87 |
-
def
|
| 88 |
"""Analyze an image using LangChain's ChatOpenAI with vision"""
|
| 89 |
try:
|
| 90 |
# Create vision-capable LLM
|
|
|
|
| 84 |
except Exception as e:
|
| 85 |
raise Exception(f"Error encoding image: {e}")
|
| 86 |
|
| 87 |
+
def analyze_image(image_path: str, question: str = "What do you see in this image?") -> str:
|
| 88 |
"""Analyze an image using LangChain's ChatOpenAI with vision"""
|
| 89 |
try:
|
| 90 |
# Create vision-capable LLM
|