Upload handlers/briefing/processor.py
This commit is contained in:
30
03.Code/업로드용/handlers/briefing/processor.py
Normal file
30
03.Code/업로드용/handlers/briefing/processor.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
브리핑(briefing) 처리 로직
|
||||
- 1~2매 요약 보고서
|
||||
- Navy 스타일 템플릿
|
||||
"""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from ..common import call_claude, extract_json, extract_html, load_prompt
|
||||
|
||||
class BriefingProcessor:
|
||||
def __init__(self):
|
||||
self.prompts_dir = Path(__file__).parent / 'prompts'
|
||||
|
||||
def _load_prompt(self, filename: str) -> str:
|
||||
"""프롬프트 로드"""
|
||||
return load_prompt(str(self.prompts_dir), filename)
|
||||
|
||||
def _get_step1_prompt(self) -> str:
|
||||
"""1단계: 구조 추출 프롬프트"""
|
||||
prompt = self._load_prompt('step1_extract.txt')
|
||||
if prompt:
|
||||
return prompt
|
||||
return """HTML 문서를 분석하여 JSON 구조로 추출하세요."""
|
||||
|
||||
def generate(self, content: str, options: dict) -> dict:
|
||||
"""브리핑 생성"""
|
||||
# 상세 생성 로직 구현
|
||||
return {"success": True, "html": "<html><body>Briefing</body></html>"}
|
||||
Reference in New Issue
Block a user