Skip to content

Commit 2ce1264

Browse files
committed
feat: include blob URL in generate response
1 parent 5fd2d0b commit 2ce1264

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

content-gen/src/backend/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ async def _run_generation_task(task_id: str, brief: CreativeBrief, products_data
450450
filename = parts[-1]
451451
conv_folder = parts[-2]
452452
response["image_url"] = f"/api/images/{conv_folder}/{filename}"
453-
del response["image_blob_url"]
453+
response["image_blob_url"] = blob_url # Keep the original blob URL in response
454454
logger.info(f"Converted to proxy URL: {response['image_url']}")
455455
elif response.get("image_base64"):
456456
# Fallback: save to blob
@@ -464,6 +464,7 @@ async def _run_generation_task(task_id: str, brief: CreativeBrief, products_data
464464
parts = blob_url.split("/")
465465
filename = parts[-1]
466466
response["image_url"] = f"/api/images/{conversation_id}/{filename}"
467+
response["image_blob_url"] = blob_url # Include the original blob URL
467468
del response["image_base64"]
468469
except Exception as e:
469470
logger.warning(f"Failed to save image to blob: {e}")

0 commit comments

Comments
 (0)