From f821e5ad2813ca3beeb4dbc31679a1654c6d7f33 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 5 Jan 2026 12:10:17 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=86=99=E5=85=A5=E9=80=BB=E8=BE=91=E5=B9=B6=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E6=9C=AA=E8=8E=B7=E5=8F=96=E5=90=91=E9=87=8F=E5=A1=AB?= =?UTF-8?q?=E5=85=85=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Module/AI.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/Module/AI.php b/app/Module/AI.php index 72eca65a3..28d56a48e 100644 --- a/app/Module/AI.php +++ b/app/Module/AI.php @@ -943,18 +943,13 @@ class AI if (!empty($embedding) && is_array($embedding)) { $results[$originalIndex] = $embedding; - - // 写入缓存 - $text = $uncachedTexts[$itemIndex]; - $cacheKey = "openAIEmbedding::" . md5($text); - Cache::put($cacheKey, Base::retSuccess("success", $embedding), Carbon::now()->addDays(7)); } else { $results[$originalIndex] = []; } } // 填充未获取到向量的位置 - foreach ($uncachedIndices as $i => $originalIndex) { + foreach ($uncachedIndices as $originalIndex) { if (!isset($results[$originalIndex])) { $results[$originalIndex] = []; }