feat: Optimize search functionality and AI module integration

- Refactor Manticore search classes for better performance
- Update AI module with enhanced processing capabilities
- Improve Apps module functionality
- Enhance SearchBox Vue component with new features
This commit is contained in:
kuaifan
2026-01-06 07:25:23 +00:00
parent 4ba02b9dce
commit f496bc5fca
9 changed files with 249 additions and 286 deletions

View File

@@ -852,8 +852,10 @@ class AI
return Base::retSuccess("success", []);
}
// 限制批量大小OpenAI 最多支持 2048 条,这里限制 100 条)
$texts = array_slice($texts, 0, 100);
// 限制批量大小
// OpenAI 限制:最多 2048 条,单次请求合计最多 300,000 tokens
// 这里限制 500 条,假设平均每条 500 tokens合计 250,000 tokens
$texts = array_slice($texts, 0, 500);
// 准备结果数组,并检查缓存
$results = [];