diff --git a/content.js b/content.js index d838910..4fdf824 100644 --- a/content.js +++ b/content.js @@ -1028,7 +1028,11 @@ Brief honest assessment of this opportunity for my profile` document.querySelectorAll('.lja-badge').forEach(b => b.remove()); - const listDataStr = JSON.stringify(jobsToScan.map(j => ({ index: j.index, title: j.title, company: j.company }))); + if (jobsToScan.length === 0) return; + + // Limit to 25 jobs per scan to prevent AI token truncation + const jobsToProcess = jobsToScan.slice(0, 25); + const listDataStr = JSON.stringify(jobsToProcess.map(j => ({ index: j.index, title: j.title, company: j.company }))); const settings = await getSettings(); if (!settings.apiKey) { @@ -1050,7 +1054,7 @@ Brief honest assessment of this opportunity for my profile` headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: promptStr }] }], - generationConfig: { maxOutputTokens: 2048, temperature: 0.1 } + generationConfig: { temperature: 0.1, responseMimeType: "application/json" } }) } ); diff --git a/cv_template.html b/cv_template.html index 55e5a36..0c0905b 100644 --- a/cv_template.html +++ b/cv_template.html @@ -139,7 +139,7 @@
@@ -160,8 +160,7 @@
Education & Certifications
diff --git a/server/cv_template.html b/server/cv_template.html index 55e5a36..0c0905b 100644 --- a/server/cv_template.html +++ b/server/cv_template.html @@ -139,7 +139,7 @@
@@ -160,8 +160,7 @@
Education & Certifications