fix(blog-lab): AI 생성 콘텐츠에 현재 날짜 컨텍스트 추가

Claude API 호출 시 시스템 프롬프트에 현재 날짜를 포함하여
2024년이 아닌 실제 날짜 기준으로 콘텐츠가 생성되도록 수정.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 02:09:49 +09:00
parent 74891eaa60
commit 14674c4e9a
3 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import json
import logging
from datetime import date
from typing import Any, Dict, Optional
import anthropic
@@ -44,9 +45,11 @@ def review_post(title: str, body: str) -> Dict[str, Any]:
prompt = template.format(title=title, body=body[:6000])
client = _get_client()
today = date.today().isoformat()
resp = client.messages.create(
model=CLAUDE_MODEL,
max_tokens=2048,
system=f"현재 날짜는 {today}입니다.",
messages=[{"role": "user", "content": prompt}],
)
raw = resp.content[0].text