Fix syntax error in image processing: fix truncated variable assignment

This commit is contained in:
2025-12-07 18:03:36 +02:00
parent 7dd671d6cf
commit 782d8e4f84

View File

@@ -367,8 +367,7 @@ async def on_message(message):
print(f"✅ Image downloaded, analyzing with vision model...")
# Analyze image
qwen_description = await analyze_image_with_qwen(base64_img)
truncated = (qwen_description[:50] + "...")
if not base64_img:if len(qwen_description) > 50 else qwen_description
truncated = (qwen_description[:50] + "...") if len(qwen_description) > 50 else qwen_description
print(f"📝 Vision analysis result: {truncated}")
if qwen_description and qwen_description.strip():
embed_context_parts.append(f"[Embedded image shows: {qwen_description}]")