feat: switch to latest gemini 3.5 flash lite models
Build and Deploy / build-and-push (push) Successful in 44s

This commit is contained in:
AI Bot
2026-09-02 12:57:19 +05:30
parent 8f3df482df
commit 253c705f52
+2 -2
View File
@@ -338,7 +338,7 @@ app.post('/api/sparkplug/extract', authenticate, upload.single('file'), async (r
// Call Gemini to extract prompt // Call Gemini to extract prompt
const genAI = new GoogleGenerativeAI(geminiKey); const genAI = new GoogleGenerativeAI(geminiKey);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash-8b" }); const model = genAI.getGenerativeModel({ model: "gemini-3.5-flash-lite" });
const prompt = ` const prompt = `
You are an expert product designer. Read the following text from a product spec PDF and create a highly detailed, concise visual design prompt for an image generation AI. You are an expert product designer. Read the following text from a product spec PDF and create a highly detailed, concise visual design prompt for an image generation AI.
@@ -373,7 +373,7 @@ app.post('/api/sparkplug/generate-images', authenticate, async (req, res) => {
if (!apiKey) return res.status(400).json({ error: 'Nano Banana (Gemini) API key missing' }); if (!apiKey) return res.status(400).json({ error: 'Nano Banana (Gemini) API key missing' });
// We will use axios to call the Gemini Imagen REST API // We will use axios to call the Gemini Imagen REST API
const baseUrl = 'https://generativelanguage.googleapis.com/v1beta/models/imagen-3.0-generate-001:predict'; const baseUrl = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-lite-image:predict';
const views = ['Front view', 'Back view', 'Left side view', 'Right side view']; const views = ['Front view', 'Back view', 'Left side view', 'Right side view'];
const imageUrls = []; const imageUrls = [];