Update server.js via upload script - 2026-09-09 17:19:12

This commit is contained in:
mike 2026-09-09 17:19:21 +08:00
parent 86cf280c9a
commit 3c1c72ac39
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,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: 16000, temperature: 0.2 });
], { maxTokens: 64000, temperature: 0.2 });
const { data: products, truncated } = extractJson(content);
if (!Array.isArray(products)) throw new Error('AI没有返回预期的数组格式请重试');
// 双保险即使AI没完全听话这里直接强制覆盖保证和用户预选的一致