This commit is contained in:
wyn
2026-05-21 16:24:34 +08:00
parent 8cd033a56d
commit d9c3243053
3 changed files with 14 additions and 2 deletions

View File

@@ -6640,6 +6640,10 @@ class Article extends Base
return jsonError($e->getMessage());
}
}
public function checkOne(){
$svc = new ReferenceCheckService();
$svc->checkOne();
}
public function referenceCheckEnqueueArticleMain(){
$amId = 127448;
$svc = new ReferenceCheckService();

View File

@@ -82,10 +82,15 @@ class ReferenceCheck
$llm = new LLMService();
$llmResult = $llm->checkReference($contentA, $contentB);
$isMatch = !empty($llmResult['is_match']);
$confidence = $llm->enforceReferenceCheckConfidence(
isset($llmResult['confidence']) ? $llmResult['confidence'] : 0,
$isMatch
);
Db::name('article_reference_check_result')->where('id', $checkId)->update([
'is_match' => !empty($llmResult['is_match']) ? 1 : 0,
'confidence' => $llmResult['confidence'],
'is_match' => $isMatch ? 1 : 0,
'confidence' => $confidence,
'reason' => $llmResult['reason'],
'status' => 1,
'error_msg' => '',

View File

@@ -131,6 +131,9 @@ class ReferenceCheckService
$this->setAmRefCheckStatus($amId, self::AM_STATUS_RUNNING);
}
public function checkOne(){
$this->pushJob(intval(722), 0);
}
public function enqueueByArticle($articleId){
if ($articleId <= 0) {
throw new \InvalidArgumentException('article_id is required');