diff --git a/journey/plans/archive/251016_emotion_integration_plan.md b/journey/plans/archive/251016_emotion_integration_plan.md index adea7f7..590ca03 100644 --- a/journey/plans/archive/251016_emotion_integration_plan.md +++ b/journey/plans/archive/251016_emotion_integration_plan.md @@ -22,7 +22,35 @@ ## 구현 완료: 감정 기반 응답 톤 자동 조정 -→ 상세: `troubleshooting/250103_감정_기반_응답_길이_제어_구현.md` +**완료일**: 2025-01-03 +**커밋**: (푸시 전) + +### 완료 사항 +- ✅ `llm_service.py`에서 감정 분석 후 system_instruction 동적 생성 (227-233줄) +- ✅ single_strategies/compound_strategies로 감정-전략 매핑 (202-208줄) +- ✅ XML 구조화된 system_instruction을 context에 추가하여 gemini_handler에 전달 +- ✅ 이모지 제거: remove_emoji로 모든 이모지 제거 (원칙 준수: 명시적 요청 시만 허용) +- ✅ 응답 길이 명시적 제어: emotion_length_map 추가, system_instruction에 길이 지시 포함 (210-220줄, 244줄) + +### 구현 상세 + +**감정별 응답 길이 매핑** (`llm_service.py:210-220`): +```python +emotion_length_map = { + 'fear': "짧게", + 'anger': "중간", + 'sadness': "중간", + 'joy': "중간", + 'happiness': "중간", + 'surprise': "중간", + 'disgust': "중간", + 'neutral': "중간" +} +``` + +**system_instruction에 길이 지시 추가** (`llm_service.py:244`): +- 전략 텍스트와 함께 길이 지시 포함: "{strategy} {length_instruction} 응답하세요." +- 예: "공감과 이해를 담아 부드럽게 짧게 응답하세요." (fear 감정) ---