merge all items

This commit is contained in:
jaehwang committed 2026-06-04 14:56:12 +09:00
commit 9919529a88
7 files changed
+301 -6

No files matched your search

+2 -1
View File
@@ -74,7 +74,7 @@ class FirecrawlClient:
headers=self._headers(),
json_body={
"url": url,
"formats": ["json", "links"],
"formats": ["json", "links", "html"],
"jsonOptions": {
"prompt": "Extract: clinic name (Korean), clinic name (English), address, phone with dash format, business hours, slogan, services offered, doctors with name/title/specialty, brand identity (primary/accent/background/text colors in hex, heading/body fonts, logo URL from the actual header/main <img> src, og:image from <meta property='og:image'> content, favicon URL)",
"schema": {
@@ -147,6 +147,7 @@ class FirecrawlClient:
# "socialMedia": info.get("socialMedia", {}),
"branding": info.get("branding", {}),
"siteLinks": data.get("links", []),
"html": data.get("html", ""), # raw HTML — collect 단계에서 tracking 추출 후 raw_data 에는 저장 안 함.
"sourceUrl": url,
}
+8
View File
@@ -11,6 +11,7 @@ from integrations.llm.schemas.report import (
TransformationInput, TransformationProposal,
RoadmapInput, RoadmapOutput,
ScoresInput, ScoresOutput,
OtherChannelsInput, OtherChannelsOutput
)
from integrations.llm.schemas.plan import PlanInput, PlanOutput
from integrations.llm.schemas.market import (
@@ -146,3 +147,10 @@ roadmap_prompt = Prompt(
input_class=RoadmapInput,
output_class=RoadmapOutput,
)
other_channels_prompt = Prompt(
file_name="other_channels_prompt.txt",
prompt_model="REPORT_MODEL",
input_class=OtherChannelsInput,
output_class=OtherChannelsOutput,
)
+13
View File
@@ -213,6 +213,19 @@ class OtherChannel(BaseModel):
url: str | None = None
class OtherChannelsInput(BaseModel):
clinic_name: str
tiktok: str | None = None
kakao_talk: str | None = None
naver_cafe: str | None = None
naver_blog: str | None = None
gangnam_unni: str | None = None
class OtherChannelsOutput(BaseModel):
other_channels: list[OtherChannel]
class TrackingPixel(BaseModel):
name: str
installed: bool
@@ -0,0 +1,45 @@
당신은 의료 마케팅 분석가입니다. 아래 부가 채널 데이터를 보고 `other_channels` 리스트만 JSON 으로 생성하세요.
결과물은 한국어로 작성하세요.
## 병원
- 병원명: {clinic_name}
## 부가 채널 raw 데이터
### TikTok
{tiktok}
### KakaoTalk
{kakao_talk}
### Naver Cafe
{naver_cafe}
### Naver Blog
{naver_blog}
### Gangnam Unni
{gangnam_unni}
## 작성 지침
- 메인 audit(YouTube/Instagram KR/Facebook KR/Website)에 **포함되지 않은** 채널만 넣으세요.
- 위 채널 데이터에 **실제 값이 있는 채널만** status=active 와 실제 URL 로 일관되게 포함:
- **카카오톡·네이버 카페**: {kakao_talk} 또는 {naver_cafe} 에 url 이 있으면 each "KakaoTalk" / "Naver Cafe" 로 status=active + 해당 url 로 포함. 수집된 콘텐츠 데이터는 없으므로 URL 존재 자체가 활성 채널 신호. **둘 다 null/빈 값이면 절대 만들지 마세요.**
- **그 외 데이터 없는 채널(네이버플레이스/Threads 등)은 절대 임의로 만들지 마세요.** 데이터 없으면 그 채널은 생략 (랜덤 생성·추측 금지).
- url 은 위 raw 데이터의 **실제 URL 만** 사용. 없으면 빈 문자열.
- **URL 에 'https://www.facebook.com/' 같은 prefix 를 절대 직접 만들지 마세요.** 받은 데이터 URL = 출력 URL. 이미 'https://...' 가 붙은 URL 에 또 prefix 붙이면 깨집니다.
- `details` 는 해당 채널의 짧은 1줄 묘사 (예: "팔로워 1.2만, 주 2회 게시", "오픈채팅 상담", "환자 후기 게시판"). 데이터 없으면 빈 문자열.
## 출력 형식
```json
{{
"other_channels": [
{{"name": "Naver Blog", "status": "active", "details": "...", "url": "https://..."}},
...
]
}}
```
`status` 는 active / inactive / unknown / not_found 중 하나. 데이터·URL 모두 없으면 그 채널 자체를 생략하세요 (null 항목 만들지 말 것).