1
This commit is contained in:
@@ -120,10 +120,10 @@ class Production extends Base
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
$p_info = $this->production_article_obj->where('p_article_id',$data['p_article_id'])->find();
|
||||
$mains = $this->production_article_main_obj->where('p_article_id',$data['p_article_id'])->where('state',0)->select();
|
||||
$re['mains'] = $mains;
|
||||
|
||||
$re['production'] = $p_info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
@@ -163,6 +163,28 @@ class Production extends Base
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**main内容gpt程序校对
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function mainGptcheck(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'p_main_id'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$main_info = $this->production_article_main_obj->where('p_main_id',$data['p_main_id'])->find();
|
||||
if(mb_strlen($main_info['content'])<20){
|
||||
return trim($main_info['content']);
|
||||
}
|
||||
$res = object_to_array(json_decode(pushGpt('请将以下内容按照医学期刊的标准校对,不要改变原意,主要是对格式和拼写的校对,将<b></b><i></i>这四个标签保留,将校对好的内容返回 :'.trim($main_info['content']))));
|
||||
$r = $res['choices'][0]['message']['content'];
|
||||
$re['content'] = $r;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产实例
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user