Fix: [3.0.1] 응답에 video_url/channel_name 포함 + 요약 프롬프트 개선
All checks were successful
news-summary-bot-cicd / build_push_deploy (push) Successful in 15m25s

- API 응답에 video_url, channel_name을 항상 포함 (n8n Switch 이후 사용)
- channel_name 필드를 request body에서 받아 그대로 반환
- 요약 프롬프트: 구체적 수치/사례 포함, 메타 서술 금지, 시청자 액션 제시
- 문서 전체 API 응답 형식 업데이트

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sm4640
2026-03-25 16:19:15 +09:00
parent b9e1c4fb45
commit f4532840cf
6 changed files with 28 additions and 20 deletions

View File

@@ -35,13 +35,13 @@ n8n(YouTube API로 새 영상 감지) → `POST /api/news/summarize` → 자막
```json
// 성공
{"status": "ok", "title": "...", "summary": "요약 텍스트"}
{"video_url": "...", "title": "...", "channel_name": "...", "status": "ok", "summary": "요약 텍스트"}
// 스킵 (라이브/쇼츠)
{"status": "skipped", "title": "...", "reason": "라이브/예정 영상은 요약 대상이 아닙니다"}
{"video_url": "...", "title": "...", "channel_name": "...", "status": "skipped", "reason": "라이브/예정 영상은 요약 대상이 아닙니다"}
// 에러
{"status": "error", "title": "...", "error_type": "ValueError", "error_message": "..."}
{"video_url": "...", "title": "...", "channel_name": "...", "status": "error", "error_type": "ValueError", "error_message": "..."}
```
## 환경변수
@@ -156,7 +156,8 @@ return $input.all().filter(item => {
```json
{
"video_url": "{{ $json.video_url }}",
"title": "{{ $json.title }}"
"title": "{{ $json.title }}",
"channel_name": "{{ $json.channel_name }}"
}
```
- **Headers** (API_SECRET 사용 시): `X-Api-Secret: <시크릿값>`