현재 작업 전체 반영

This commit is contained in:
Yun Chan 2026-06-27 16:08:41 +09:00
parent 5560638e54
commit c0dddab594
85 changed files with 11322 additions and 539 deletions

View file

@ -23,6 +23,12 @@ from typing import Optional
# ── 출력 가드레일 상한 (R5) ──────────────────────────────
IDEATION_STAGE_CAP = 3 # 내담자 발화/상태가 넘을 수 없는 자살사고 단계 상한
CRISIS_HOTLINE_NUMBER = "109"
CRISIS_HOTLINE_LABEL = "자살예방상담전화 109"
CRISIS_RESOURCE_MESSAGE = (
"지금은 연습을 멈추고 실제 안전 확인이 먼저입니다. 즉시 위험하면 119 또는 가까운 "
"응급실에 연락하고, 자살예방상담전화 109로 도움을 요청하세요."
)
# ════════════════════════════════════════════════════════════════════════════
@ -224,8 +230,20 @@ def clamp_ideation(stage: int) -> int:
return max(1, min(IDEATION_STAGE_CAP, stage))
def crisis_resource() -> dict[str, str]:
"""LLM 밖 위기 안내 리소스. UI/API 응답에 그대로 실어 보낸다."""
return {
"title": CRISIS_HOTLINE_LABEL,
"number": CRISIS_HOTLINE_NUMBER,
"message": CRISIS_RESOURCE_MESSAGE,
}
__all__ = [
"IDEATION_STAGE_CAP",
"CRISIS_HOTLINE_NUMBER",
"CRISIS_HOTLINE_LABEL",
"CRISIS_RESOURCE_MESSAGE",
"MaskResult",
"mask_pii",
"CrisisKind",
@ -234,4 +252,5 @@ __all__ = [
"OutputGuardResult",
"sanitize_client_reply",
"clamp_ideation",
"crisis_resource",
]