feat:트렌딩 키워드 수집 + Veo 3.1 프롬프트 강화 파이프라인
- Google Trends RSS 기반 실시간 급상승 키워드 수집 서비스 추가 - 트렌딩 컨텍스트 활용 후킹 제목 생성 (5패턴: 충격/비교/숫자/질문/반전) - Veo 3.1 공식 가이드 기반 visual_prompt 5요소 프레임워크 적용 - GET /video/veo3/trending 엔드포인트 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
use App\Models\VideoGeneration;
|
||||
use App\Services\GoogleCloudStorageService;
|
||||
use App\Services\Video\GeminiScriptService;
|
||||
use App\Services\Video\TrendingKeywordService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -18,7 +19,8 @@ class Veo3Controller extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly GeminiScriptService $geminiService,
|
||||
private readonly GoogleCloudStorageService $gcsService
|
||||
private readonly GoogleCloudStorageService $gcsService,
|
||||
private readonly TrendingKeywordService $trendingService
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -34,16 +36,36 @@ public function index(Request $request): View|Response
|
||||
}
|
||||
|
||||
/**
|
||||
* 키워드 → 제목 후보 생성
|
||||
* 실시간 급상승 키워드 목록
|
||||
*/
|
||||
public function fetchTrending(): JsonResponse
|
||||
{
|
||||
$keywords = $this->trendingService->fetchTrendingKeywords(10);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'keywords' => $keywords,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 키워드 → 제목 후보 생성 (trending_context 옵션 지원)
|
||||
*/
|
||||
public function generateTitles(Request $request): JsonResponse
|
||||
{
|
||||
$request->validate([
|
||||
'keyword' => 'required|string|max:100',
|
||||
'trending_context' => 'nullable|array',
|
||||
]);
|
||||
|
||||
$keyword = $request->input('keyword');
|
||||
$titles = $this->geminiService->generateTrendingTitles($keyword);
|
||||
$trendingContext = $request->input('trending_context');
|
||||
|
||||
if ($trendingContext) {
|
||||
$titles = $this->geminiService->generateTrendingHookTitles($keyword, $trendingContext);
|
||||
} else {
|
||||
$titles = $this->geminiService->generateTrendingTitles($keyword);
|
||||
}
|
||||
|
||||
if (empty($titles)) {
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user