From 3c1cd2aa6e8a2b37ed0d376943672df42c032d99 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Thu, 2 Oct 2025 11:19:25 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=90=EC=A0=95=20=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=85=9C=20=EB=AC=B8=EC=84=9C=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20-=20skill-embedding=20=EA=B8=B0=EB=B0=98=20?= =?UTF-8?q?=EC=95=84=ED=82=A4=ED=85=8D=EC=B2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rb8001이 직접 ONNX 실행하지 않고 skill-embedding 호출 - 작업 순서 및 구현 상태 업데이트 --- .../20251002_emotion_system_implementation.md | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/troubleshooting/20251002_emotion_system_implementation.md b/troubleshooting/20251002_emotion_system_implementation.md index 61d5ffe..dbfc7d2 100644 --- a/troubleshooting/20251002_emotion_system_implementation.md +++ b/troubleshooting/20251002_emotion_system_implementation.md @@ -71,11 +71,11 @@ done - rb8001/app/core/emotion/monitoring.py (감정 모니터링) - rb8001/app/llm/emotion_llm.py (analyze_user_emotion, generate_response_with_emotion) -### 미구현 항목 -- rb8001/app/core/emotion/emotion_classifier.py (rb10508_micro에서 복사 필요) -- ONNX 모델 마운트 (docker-compose.yml 볼륨 설정 없음) -- emotion_readings 테이블 (없음) -- /v1/emotion/* API 엔드포인트 (없음) +### 미구현 항목 (2025-10-02 업데이트) +- ✅ rb8001/app/core/emotion/emotion_classifier.py (skill-embedding 호출로 구현) +- ✅ ONNX 모델은 skill-embedding이 처리 (rb8001 마운트 불필요) +- ✅ emotion_readings 테이블 (51123 서버에서 생성 완료) +- ✅ /v1/emotion/* API 엔드포인트 (구현 완료) ### ONNX 모델 현황 - **모델 위치** (51124 서버): /home/admin/ivada_project/onnx_models/aihub-7emotions/ @@ -183,15 +183,19 @@ done ## 작업 순서 -1. Docker 볼륨 마운트: rb8001 docker-compose.yml에 `../onnx_models:/code/onnx_models:ro` 추가 -2. 의존성 추가: rb8001/requirements.txt에 `onnxruntime==1.18.1`, `transformers==4.45.2` 추가 -3. 추론 모듈 복사: rb10508_micro/app/core/emotion/emotion_classifier.py → rb8001/app/core/emotion/ -4. EmotionAwareLLM 연결: rb8001/app/llm/emotion_llm.py:25 -5. LLMService 톤 조절: rb8001/app/llm/llm_service.py:133 -6. DB 스키마 준비: 51123 서버에서 robeing_metrics DB에 emotion_readings 테이블 생성 -7. DB 클라이언트: rb8001/app/state/database.py 활용 또는 신규 파일 생성 -8. API 라우터 생성: rb8001/app/router/emotion_endpoint.py 생성 후 main.py에 include -9. 집계 쿼리 구현: time_bucket 기반 +1. skill-embedding 서비스에 감정 분석 추가: + - emotion_service.py: ONNX 모델 로드 및 추론 + - routers/emotion.py: API 엔드포인트 (/emotion) + - main.py: 라우터 include +2. rb8001에서 skill-embedding 호출: + - emotion_classifier.py: HTTP 클라이언트로 skill-embedding 호출 + - 환경변수: SKILL_EMBEDDING_URL=http://localhost:8515 +3. EmotionAwareLLM 연결: rb8001/app/llm/emotion_llm.py:25 +4. LLMService 톤 조절: rb8001/app/llm/llm_service.py:133 +5. DB 스키마 준비: 51123 서버에서 robeing_metrics DB에 emotion_readings 테이블 생성 +6. DB 클라이언트: rb8001/app/state/database.py 활용 또는 신규 파일 생성 +7. API 라우터 생성: rb8001/app/router/emotion_endpoint.py 생성 후 main.py에 include +8. 집계 쿼리 구현: time_bucket 기반 ## 모니터링/성능