作者 lyh

gx脚本

@@ -124,16 +124,12 @@ class AiCommandController extends BaseController @@ -124,16 +124,12 @@ class AiCommandController extends BaseController
124 */ 124 */
125 public function sendLayoutDesign(){ 125 public function sendLayoutDesign(){
126 $this->request->validate([ 126 $this->request->validate([
127 - 'key'=>['required'] 127 + 'ai'=>['required']
128 ],[ 128 ],[
129 - 'key.required' => '场景不能为空', 129 + 'ai.required' => '场景不能为空',
130 ]); 130 ]);
131 - $aiCommonModel = new AiCommand();  
132 - $info = $aiCommonModel->read(['key'=>'ai_layout_design','project_id'=>$this->user['project_id']]);  
133 - if($info === false){  
134 - $info = $aiCommonModel->read(['key'=>'ai_layout_design','project_id'=>0]);  
135 - }  
136 $aiCommandService = new AiCommandService(); 131 $aiCommandService = new AiCommandService();
  132 + $info['ai'] = '请根据这个 {​海外展会与独立站数字营销的结合:线下资源如何助力线上推广} 文章标题帮我生成一个更有吸引力、引发读者兴趣的新标题,只需要给我标题内容,不要回复我别的内容(比如序号、你的提示、寒暄、代码解释、总结之类的)';
137 $result = $aiCommandService->send_layout_design($info['ai']); 133 $result = $aiCommandService->send_layout_design($info['ai']);
138 $this->response('success', Code::SUCCESS, $result); 134 $this->response('success', Code::SUCCESS, $result);
139 } 135 }