Corrige a inclusao de obs gerais e aumenta limites de tokens das IAs para evitar cortes

This commit is contained in:
2026-06-02 15:02:10 +00:00
parent 532bb95e9b
commit c966be7ed4
2 changed files with 192 additions and 3 deletions
+4 -3
View File
@@ -913,6 +913,7 @@ app.post('/api/modelos/gerar-relatorio', requireAuth, async (req, res) => {
SELECT 1 FROM jsonb_array_elements_text(criancas) AS c
WHERE LOWER(c) LIKE $${pCount}
))
OR jsonb_typeof(criancas) = 'null'
OR criancas IS NULL
)`;
params.push(`%${crianca.toLowerCase()}%`);
@@ -1017,7 +1018,7 @@ Orientações adicionais:
model: process.env.OPENROUTER_MODEL || 'openai/gpt-4.1-nano',
messages: [{ role: 'user', content: systemPrompt }],
temperature: 0.5,
max_tokens: 2500
max_tokens: 6000
})
});
if (response.ok) {
@@ -1039,7 +1040,7 @@ Orientações adicionais:
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
contents: [{ parts: [{ text: systemPrompt }] }],
generationConfig: { temperature: 0.5, maxOutputTokens: 2500 }
generationConfig: { temperature: 0.5, maxOutputTokens: 8192 }
})
});
if (response.ok) {
@@ -1065,7 +1066,7 @@ Orientações adicionais:
model: process.env.GROQ_MODEL || 'llama-3.3-70b-versatile',
messages: [{ role: 'user', content: systemPrompt }],
temperature: 0.5,
max_tokens: 2500
max_tokens: 6000
})
});
if (response.ok) {