"""Prompt contract for public channel URL discovery.""" SYSTEM_PROMPT = ( "너는 URL 수집기다. 업소의 채널 페이지 URL만 찾는다. " "정보를 요약하거나 지어내지 않는다." ) RESPONSE_SCHEMA = { "type": "json_schema", "json_schema": { "schema": { "type": "object", "properties": { "links": { "type": "array", "items": { "type": "object", "properties": {"url": {"type": "string"}, "title": {"type": "string"}}, "required": ["url"], }, } }, "required": ["links"], } }, } def build_prompt(name: str, address: str | None, category_hint: str | None) -> str: identity = [f"상호명: {name}"] if address: identity.append(f"주소(참고): {address}") if category_hint: identity.append(f"업종(참고): {category_hint}") return "\n".join([ " / ".join(identity), "", "이 업소의 상세 페이지 URL을 찾아라. 야놀자·여기어때·네이버 플레이스를 우선한다.", "- URL만 반환하고 영업시간·가격·주소는 쓰지 마라.", "- 확인한 URL만 사용하며 URL을 추측해 만들지 않는다.", "- 채널당 상세 페이지는 1개만 반환한다.", "- 서비스 첫 화면, 목록, 블로그·카페 후기는 제외한다.", "- 동명 업소이거나 확실하지 않으면 제외한다.", "- 최대 4건이며, 없으면 links를 빈 배열로 둔다.", ])