队列
This commit is contained in:
@@ -229,7 +229,7 @@ class Aiarticle extends Base
|
||||
//是否查询作者 1是2否
|
||||
$iSelectAuthor = empty($aParam['is_select_author']) ? 2 : $aParam['is_select_author'];
|
||||
//查询AI生成的文章内容
|
||||
$aWhere = ['is_delete' => 2];
|
||||
$aWhere = ['is_delete' => 2,'is_generate' => 1];
|
||||
if(!empty($iArticleId)){
|
||||
$aWhere['article_id'] = $iArticleId;
|
||||
}
|
||||
@@ -666,7 +666,7 @@ class Aiarticle extends Base
|
||||
$aSearch['{###covered###}'] = empty($aSearch['{###covered###}']) ? '' : '内容涵盖'.$aSearch['{###covered###}'];
|
||||
|
||||
$sTemplate = str_replace(array_keys($aSearch), array_values($aSearch), $sTemplate);
|
||||
$this->writeFile($sTemplate,ROOT_PATH.'public/template_info.html');
|
||||
// $this->writeFile($sTemplate,ROOT_PATH.'public/template_info.html');
|
||||
return json_encode(['status' => 1, 'msg' => '模版生成成功','data' => ['template' => $sTemplate]]);
|
||||
}
|
||||
|
||||
@@ -726,7 +726,7 @@ class Aiarticle extends Base
|
||||
if(!empty($aTranslate)){
|
||||
$aSearch['{#content#}'] = json_encode($aTranslate);
|
||||
$oOpenAi = new OpenAi;
|
||||
$aTranslate = $oOpenAi->translate($aSearch);
|
||||
$aTranslate = $oOpenAi->buildTranslatePrompt($aSearch);
|
||||
$aTranslate = empty($aTranslate['data']) ? [] : $aTranslate['data'];
|
||||
}
|
||||
//翻译内容处理
|
||||
|
||||
Reference in New Issue
Block a user