正在显示
1 个修改的文件
包含
2 行增加
和
8 行删除
| @@ -4,10 +4,8 @@ namespace App\Console\Commands\Tdk; | @@ -4,10 +4,8 @@ namespace App\Console\Commands\Tdk; | ||
| 4 | 4 | ||
| 5 | use App\Exceptions\ValidateException; | 5 | use App\Exceptions\ValidateException; |
| 6 | use App\Helper\Arr; | 6 | use App\Helper\Arr; |
| 7 | -use App\Helper\Common; | ||
| 8 | use App\Helper\Gpt; | 7 | use App\Helper\Gpt; |
| 9 | use App\Models\Ai\AiCommand; | 8 | use App\Models\Ai\AiCommand; |
| 10 | -use App\Models\Ai\AiTdkErrorLog; | ||
| 11 | use App\Models\Com\NoticeLog; | 9 | use App\Models\Com\NoticeLog; |
| 12 | use App\Models\Domain\DomainInfo; | 10 | use App\Models\Domain\DomainInfo; |
| 13 | use App\Models\Product\Keyword; | 11 | use App\Models\Product\Keyword; |
| @@ -17,11 +15,8 @@ use App\Models\Project\DeployOptimize; | @@ -17,11 +15,8 @@ use App\Models\Project\DeployOptimize; | ||
| 17 | use App\Models\Project\ProjectKeywordAiTask; | 15 | use App\Models\Project\ProjectKeywordAiTask; |
| 18 | use App\Services\ProjectServer; | 16 | use App\Services\ProjectServer; |
| 19 | use Illuminate\Console\Command; | 17 | use Illuminate\Console\Command; |
| 20 | -use Illuminate\Database\Eloquent\Model; | ||
| 21 | -use Illuminate\Support\Facades\Cache; | ||
| 22 | use Illuminate\Support\Facades\DB; | 18 | use Illuminate\Support\Facades\DB; |
| 23 | use Illuminate\Support\Facades\Redis; | 19 | use Illuminate\Support\Facades\Redis; |
| 24 | -use Illuminate\Support\Str; | ||
| 25 | 20 | ||
| 26 | /** | 21 | /** |
| 27 | * 关键词聚合页AI生成内容 | 22 | * 关键词聚合页AI生成内容 |
| @@ -103,8 +98,8 @@ class KeywordPageAiContent extends Command | @@ -103,8 +98,8 @@ class KeywordPageAiContent extends Command | ||
| 103 | { | 98 | { |
| 104 | //前后缀 | 99 | //前后缀 |
| 105 | $affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first(); | 100 | $affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first(); |
| 106 | - $prefix = empty($affix['prefix']) ? [] : array_map('strtolower', explode("\r\n", $affix['prefix'])); | ||
| 107 | - $suffix = empty($affix['suffix']) ? [] : array_map('strtolower', explode("\r\n", $affix['suffix'])); | 101 | + $prefix = empty($affix['prefix']) ? [] : explode("\r\n", $affix['prefix']); |
| 102 | + $suffix = empty($affix['suffix']) ? [] : explode("\r\n", $affix['suffix']); | ||
| 108 | if (!$prefix || !$suffix) { | 103 | if (!$prefix || !$suffix) { |
| 109 | throw new ValidateException('扩展标题前后缀不存在'); | 104 | throw new ValidateException('扩展标题前后缀不存在'); |
| 110 | } | 105 | } |
| @@ -203,7 +198,6 @@ class KeywordPageAiContent extends Command | @@ -203,7 +198,6 @@ class KeywordPageAiContent extends Command | ||
| 203 | } | 198 | } |
| 204 | if (strpos($prompt, '{chart_type}') !== false) { | 199 | if (strpos($prompt, '{chart_type}') !== false) { |
| 205 | shuffle($this->chart_types); | 200 | shuffle($this->chart_types); |
| 206 | - dump($this->chart_types[0]); | ||
| 207 | $prompt = str_replace('{chart_type}', $this->chart_types[0], $prompt); | 201 | $prompt = str_replace('{chart_type}', $this->chart_types[0], $prompt); |
| 208 | } | 202 | } |
| 209 | 203 |
-
请 注册 或 登录 后发表评论