Files
_Geulbeot/02. Prompts/문서생성/codedomain/다음_로우데이터를_Python_v01.py
T

13 lines
547 B
Python

def summarize_data_for(section: str):
texts = []
for path in sorted(os.listdir(DATA_DIR)):
with open(path, encoding="utf-8", errors="ignore") as f:
texts.append(f.read())
prompt = (
f"다음 로우데이터를 바탕으로 ‘{section}’ 섹션에 들어갈 핵심 사실과 수치를 200~300자로 요약해주세요.\n\n"
+ "\n\n".join(texts)
)
return call_claude(prompt)
# ─── 4) 이미지 자동 매핑 ─────────────────────────