Update server.js via upload script - 2026-07-28 15:49:45

This commit is contained in:
mike 2026-07-28 15:50:07 +08:00
parent 18d17ca121
commit 4cb82025f9
1 changed files with 1 additions and 1 deletions

View File

@ -599,7 +599,7 @@ app.post('/api/ai/parse-catalog', requireAuth, aiLimiter, (req, res) => {
const content = await callDeepSeekWithRetry(cfg.apiKey, [
{ role: 'system', content: CATALOG_PARSE_SYSTEM_PROMPT },
{ role: 'user', content: userContent },
], { maxTokens: 8000, temperature: 0.2 });
], { maxTokens: 16000, temperature: 0.2 });
const { data: products, truncated } = extractJson(content);
if (!Array.isArray(products)) throw new Error('AI没有返回预期的数组格式请重试');
// 双保险即使AI没完全听话这里直接强制覆盖保证和用户预选的一致