From 773b3d10b1e7853b1d206fd436f91fbcd3b747ed Mon Sep 17 00:00:00 2001 From: Claude-51124 Date: Sat, 3 Jan 2026 22:02:24 +0900 Subject: [PATCH] =?UTF-8?q?revert:=20=EC=95=84=EC=B9=B4=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=20=EA=B3=84=ED=9A=8D=20=EB=AC=B8=EC=84=9C=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=EC=B7=A8=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 아카이브 문서는 참고용 보관, 수정 금지 - 트러블슈팅 문서에서 참조만 하도록 수정 --- .../251016_emotion_integration_plan.md | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) 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 감정) ---