>>108690347
Godspeed, anon! Godspeed!
# Use the resolved target, not the relative path!
if is_image_file(target): # <-- fixed: pass target
try:
data_uri = image_to_base64(str(target))
return {
"__multimodal__": True,
"text": f"{Fore.GREEN} Image {file_path} successfully read.{Style.RESET_ALL}",
"image_data": data_uri,
"caption": file_path
}
except Exception as e:
return {
"__multimodal__": True,
"text": f"{Fore.RED} Error reading image {file_path}: {e}{Style.RESET_ALL}",
"image_data": None
}