feat: improve gemini prompt for intelligent handling of thin objects and text removal
Build and Deploy / build-and-push (push) Successful in 40s

This commit is contained in:
AI Bot
2026-09-02 14:26:20 +05:30
parent 87fbf6a75c
commit e24ac0f9b3
+7 -1
View File
@@ -387,7 +387,13 @@ app.post('/api/sparkplug/generate-images', authenticate, async (req, res) => {
// Run parallel generation for all 4 views
const promises = views.map(async (view, index) => {
const fullPrompt = `${prompt}. ${view}, isolated on a pure white background, studio lighting.`;
const fullPrompt = `A clean, isolated product photography shot of: ${prompt}.
Focus ONLY on the product itself.
View: ${view}.
CRITICAL INSTRUCTIONS:
1. Pure white background.
2. DO NOT include any infographics, extra text, labels, icons, or background scenery. Just the isolated object.
3. If this object is very thin (like a sachet, pouch, or packet), the 'Left side view' and 'Right side view' must only show the thin edge profile of the object without the main front artwork.`;
const payload = {
contents: [