Update server.js via upload script - 2026-07-28 15:49:45
This commit is contained in:
parent
18d17ca121
commit
4cb82025f9
|
|
@ -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没完全听话,这里直接强制覆盖,保证和用户预选的一致
|
||||
|
|
|
|||
Loading…
Reference in New Issue