WIP: channel-brand merge + Optional 모델 완화 + collect_extras rename + mock_urls 영문 채널 51건

머지 본체:
- 5채널 외 부가 수집(틱톡/IG·FB EN/네이버 카페/카카오톡)
- 브랜드 자산/채널 로고 Vision 분석
- ReportInput/PlanInput에 신규 채널 필드 추가
- ChannelBrandingRule literal "missing" → "N/A"

후속 로컬 작업 (분리 커밋 예정):
- fix(report): ClinicSnapshot/YouTubeAudit/Instagram*/Facebook* required→Optional (LLM null 응답 대응)
- refactor: enrichment.py → collect_extras.py (네이밍 명확화)
- data(mock_urls): 38개 병원 영문 채널 51건 추가 + 78개 필드 캐노니컬 순서 정규화

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 4.7 committed 2026-05-29 16:22:17 +09:00
commit aff2b2720d
27 files changed
+3005 -223

No files matched your search

+5
View File
@@ -8,6 +8,11 @@ class Channels(BaseModel):
facebook: str | None = None
naver_blog: str | None = None
gangnam_unni: str | None = None
tiktok: str | None = None
instagram_en: str | None = None
facebook_en: str | None = None
kakao_talk: str | None = None
naver_cafe: str | None = None
class AnalysisOptions(BaseModel):
+1 -1
View File
@@ -49,7 +49,7 @@ class ChannelBrandingRule(CamelModel):
profile_photo: str
banner_spec: str
bio_template: str
current_status: Literal["correct", "incorrect", "missing"]
current_status: Literal["correct", "incorrect", "N/A"]
class BrandGuide(CamelModel):
+71 -66
View File
@@ -66,22 +66,24 @@ class RegistryData(CamelModel):
class ClinicSnapshot(CamelModel):
name: str
name_en: str
established: str
years_in_business: int
staff_count: int
lead_doctor: LeadDoctor
overall_rating: float
total_reviews: int
price_range: PriceRange
certifications: list[str]
media_appearances: list[str]
medical_tourism: list[str]
location: str
nearest_station: str
phone: str
domain: str
# _build_overrides가 강남언니 데이터로 일부 필드를 채우고 LLM이 나머지를 채우는데,
# 둘 다 누락 가능 — required로 두면 ValidationError로 리포트 전체 실패.
name: str | None = None
name_en: str | None = None
established: str | None = None
years_in_business: int | None = None
staff_count: int | None = None
lead_doctor: LeadDoctor | None = None
overall_rating: float | None = None
total_reviews: int | None = None
price_range: PriceRange | None = None
certifications: list[str] = []
media_appearances: list[str] = []
medical_tourism: list[str] = []
location: str | None = None
nearest_station: str | None = None
phone: str | None = None
domain: str | None = None
logo_images: LogoImages | None = None
brand_colors: BrandColors | None = None
source: DataSource | None = None
@@ -121,43 +123,45 @@ class TopVideo(CamelModel):
class YouTubeAudit(CamelModel):
channel_name: str
handle: str
subscribers: int
total_videos: int
total_views: int
weekly_view_growth: WeeklyViewGrowth
estimated_monthly_revenue: EstimatedRevenue
avg_video_length: str
upload_frequency: str
channel_created_date: str
subscriber_rank: str
channel_description: str
linked_urls: list[LinkedUrl]
playlists: list[str]
top_videos: list[TopVideo]
diagnosis: list[DiagnosisItem]
# YouTube 채널 미수집 / LLM 누락 시 None 가능 — 통째 Optional.
channel_name: str | None = None
handle: str | None = None
subscribers: int | None = None
total_videos: int | None = None
total_views: int | None = None
weekly_view_growth: WeeklyViewGrowth | None = None
estimated_monthly_revenue: EstimatedRevenue | None = None
avg_video_length: str | None = None
upload_frequency: str | None = None
channel_created_date: str | None = None
subscriber_rank: str | None = None
channel_description: str | None = None
linked_urls: list[LinkedUrl] = []
playlists: list[str] = []
top_videos: list[TopVideo] = []
diagnosis: list[DiagnosisItem] = []
class InstagramAccount(CamelModel):
handle: str
language: Language
label: str
posts: int
followers: int
following: int
category: str
profile_link: str
highlights: list[str]
reels_count: int
content_format: str
profile_photo: str
bio: str
# 계정 미수집 시 None 가능 — 통째 Optional.
handle: str | None = None
language: Language | None = None
label: str | None = None
posts: int | None = None
followers: int | None = None
following: int | None = None
category: str | None = None
profile_link: str | None = None
highlights: list[str] = []
reels_count: int | None = None
content_format: str | None = None
profile_photo: str | None = None
bio: str | None = None
class InstagramAudit(CamelModel):
accounts: list[InstagramAccount]
diagnosis: list[DiagnosisItem]
accounts: list[InstagramAccount] = []
diagnosis: list[DiagnosisItem] = []
class BrandInconsistencyValue(CamelModel):
@@ -174,31 +178,32 @@ class BrandInconsistency(CamelModel):
class FacebookPage(CamelModel):
url: str
page_name: str
language: Language
label: str
followers: int
following: int
category: str
bio: str
logo: str
logo_description: str
link: str
linked_domain: str
reviews: int
recent_post_age: str
has_whatsapp: bool
# 페이지 미수집 / LLM 누락 시 None 가능 — 통째 Optional.
url: str | None = None
page_name: str | None = None
language: Language | None = None
label: str | None = None
followers: int | None = None
following: int | None = None
category: str | None = None
bio: str | None = None
logo: str | None = None
logo_description: str | None = None
link: str | None = None
linked_domain: str | None = None
reviews: int | None = None
recent_post_age: str | None = None
has_whatsapp: bool | None = None
post_frequency: str | None = None
top_content_type: str | None = None
engagement: str | None = None
class FacebookAudit(CamelModel):
pages: list[FacebookPage]
diagnosis: list[DiagnosisItem]
brand_inconsistencies: list[BrandInconsistency]
consolidation_recommendation: str
pages: list[FacebookPage] = []
diagnosis: list[DiagnosisItem] = []
brand_inconsistencies: list[BrandInconsistency] = []
consolidation_recommendation: str | None = None
class OtherChannel(CamelModel):