Changes
This commit is contained in:
@@ -6640,6 +6640,10 @@ class Article extends Base
|
|||||||
return jsonError($e->getMessage());
|
return jsonError($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function checkOne(){
|
||||||
|
$svc = new ReferenceCheckService();
|
||||||
|
$svc->checkOne();
|
||||||
|
}
|
||||||
public function referenceCheckEnqueueArticleMain(){
|
public function referenceCheckEnqueueArticleMain(){
|
||||||
$amId = 127448;
|
$amId = 127448;
|
||||||
$svc = new ReferenceCheckService();
|
$svc = new ReferenceCheckService();
|
||||||
|
|||||||
@@ -82,10 +82,15 @@ class ReferenceCheck
|
|||||||
|
|
||||||
$llm = new LLMService();
|
$llm = new LLMService();
|
||||||
$llmResult = $llm->checkReference($contentA, $contentB);
|
$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([
|
Db::name('article_reference_check_result')->where('id', $checkId)->update([
|
||||||
'is_match' => !empty($llmResult['is_match']) ? 1 : 0,
|
'is_match' => $isMatch ? 1 : 0,
|
||||||
'confidence' => $llmResult['confidence'],
|
'confidence' => $confidence,
|
||||||
'reason' => $llmResult['reason'],
|
'reason' => $llmResult['reason'],
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
'error_msg' => '',
|
'error_msg' => '',
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ class ReferenceCheckService
|
|||||||
|
|
||||||
$this->setAmRefCheckStatus($amId, self::AM_STATUS_RUNNING);
|
$this->setAmRefCheckStatus($amId, self::AM_STATUS_RUNNING);
|
||||||
}
|
}
|
||||||
|
public function checkOne(){
|
||||||
|
$this->pushJob(intval(722), 0);
|
||||||
|
}
|
||||||
public function enqueueByArticle($articleId){
|
public function enqueueByArticle($articleId){
|
||||||
if ($articleId <= 0) {
|
if ($articleId <= 0) {
|
||||||
throw new \InvalidArgumentException('article_id is required');
|
throw new \InvalidArgumentException('article_id is required');
|
||||||
|
|||||||
Reference in New Issue
Block a user