作者 zhl

Merge remote-tracking branch 'origin/master' into zhl

... ... @@ -81,8 +81,8 @@ class Common
$content = str_replace('$keyword$', $param['keywords'], $info['ai']);
$data = [
'messages'=>[
['role'=>'system','content'=>$info['scene']],
['role'=>'assistant','content'=>$content.$str],
// ['role'=>'system','content'=>$info['scene']],
['role'=>'user','content'=>$content.$str],
]
];
return http_post($url,json_encode($data));
... ...
... ... @@ -12,7 +12,7 @@ use App\Models\Ai\AiLog;
class AiCommandController extends BaseController
{
//获取文本内容
public $chat_url = 'v2/openai_chat';
public $chat_url = 'v2/openai_chat_qqs';
/**
* @name :ai生成
* @author :liyuhang
... ...
... ... @@ -68,6 +68,7 @@ class BTemplateLogic extends BaseLogic
if($this->param['source'] == $this->model::SOURCE_PRODUCT){//产品页
$TemplateInfo = $this->productHtml($info,$this->param['source'],$this->param['source_id']);
}
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($TemplateInfo['html'], true) . PHP_EOL, FILE_APPEND);
return $this->success($TemplateInfo);
}
... ... @@ -105,7 +106,7 @@ class BTemplateLogic extends BaseLogic
$TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
}else{
$commonTemplateModel = new BTemplateCommon();
$commonInfo = $commonTemplateModel->read(['template_id'=>$info['template_id'],'project_id'=>$this->user['project_id'],'type'=>$source]);
$commonInfo = $commonTemplateModel->read(['template_id'=>$info['template_id'],'project_id'=>$this->user['project_id'],'type'=>1]);
if($commonInfo !== false){
$TemplateInfo['html'] = $commonInfo['head_css'].$TemplateInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
$commonInfo['head_html'].$TemplateInfo['main_html'].$commonInfo['footer_html'];
... ...