런타임 품질 개선: Kei JSON 파싱 + 높이 예산 강제 + conclusion 강제 + FAISS 프리로드
1. kei_client.py: Kei API가 마크다운 리스트(- ) 접두사로 JSON 응답 시 전처리하여 파싱 2. image_utils.py: base_path+상대경로 이중 시 파일명 rglob 재탐색 3. design_director.py: - conclusion 꼭지 → footer zone + conclusion-accent-bar 코드 레벨 강제 - _validate_height_budget(): zone별 height_cost 합산 검증, 초과 시 큰 블록 자동 교체 - Opus 추천 프롬프트에 zone 배정 규칙 명시 (conclusion→footer 등) 4. main.py: 서버 startup 시 FAISS 인덱스 + bge-m3 모델 미리 로드 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,6 @@ def _apply_defaults(blocks: list[dict[str, Any]]) -> None:
|
||||
"topic-numbered": {"number": "1", "title": "(단계)"},
|
||||
# cards/
|
||||
"card-image-3col": {"cards": []},
|
||||
"card-text-grid": {"cards": []},
|
||||
"card-dark-overlay": {"cards": []},
|
||||
"card-tag-image": {"cards": []},
|
||||
"card-icon-desc": {"cards": []},
|
||||
@@ -264,15 +263,9 @@ def _apply_defaults(blocks: list[dict[str, Any]]) -> None:
|
||||
"process-horizontal": {"steps": []},
|
||||
"flow-arrow-horizontal": {"steps": []},
|
||||
"keyword-circle-row": {"keywords": []},
|
||||
"layer-diagram": {"layers": []},
|
||||
"timeline-vertical": {"events": []},
|
||||
"timeline-horizontal": {"events": []},
|
||||
"pyramid-hierarchy": {"levels": []},
|
||||
# emphasis/
|
||||
"quote-left-border": {"quote_text": "(인용)"},
|
||||
"quote-big-mark": {"quote_text": "(인용)"},
|
||||
"quote-question": {"question": "(질문)"},
|
||||
"conclusion-accent-bar": {"conclusion_text": "(결론)"},
|
||||
"comparison-2col": {"left_title": "A", "left_content": "-", "right_title": "B", "right_content": "-"},
|
||||
"banner-gradient": {"text": "(배너)"},
|
||||
"dark-bullet-list": {"bullets": []},
|
||||
@@ -287,7 +280,6 @@ def _apply_defaults(blocks: list[dict[str, Any]]) -> None:
|
||||
"image-side-text": {"image_src": ""},
|
||||
"image-full-caption": {"src": ""},
|
||||
"image-before-after": {"before_src": "", "after_src": ""},
|
||||
"details-block": {"summary_text": "(상세 내용)", "detail_content": ""},
|
||||
}
|
||||
for block in blocks:
|
||||
if "data" not in block:
|
||||
|
||||
Reference in New Issue
Block a user