From dc01db7c6d4b25debc29f6419c6bf0b12384fe57 Mon Sep 17 00:00:00 2001 From: Claude-51124 Date: Mon, 17 Nov 2025 15:32:23 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=ED=94=BC=EB=93=9C=EB=B0=B1=20=EB=A9=94?= =?UTF-8?q?=EC=BB=A4=EB=8B=88=EC=A6=98=20message=5Fid=20=EB=A7=A4=EC=B9=AD?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /api/message 응답에 message_id 포함됨 ({conversation_log_id}_rb8001 형식) - 프론트엔드 피드백 전송 시 정확한 conversation_log_id 매칭 가능 --- .../390_human_in_the_loop_intent_learning.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md b/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md index 3e35533..8b3a421 100644 --- a/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md +++ b/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md @@ -90,13 +90,15 @@ - Request Body: `{"message_id": "...", "feedback": "up" | "down"}` - `get_current_user`로 JWT에서 **UUID** 추출. 2. `handle_chat_feedback(user_id, message_id, feedback)` 호출: - - `message_id`에서 `conversation_log_id`를 파싱 (`"123_robeing" → 123`) + - `message_id`에서 `conversation_log_id`를 파싱 (`"123_rb8001" → 123`) - `conversation_log_id`로 `ConversationLog`를 찾아서 `message`, `intent`, `confidence`를 가져옴(있으면). - 해당 `(conversation_log_id, user_id)` 조합에 대해 리뷰 큐 행을 생성/업데이트: - `feedback='up'` → `status='confirmed'` - `feedback='down'` → `status='corrected'` 3. ConversationLog가 없는 경우(예: 임시 ID)에는 `conversation_log_id=None`으로 리뷰 큐에 최소 정보만 남긴다. +> **중요 (2025-11-17 수정)**: `/api/message` 응답에 `message_id` 필드가 포함되도록 수정됨 (`{conversation_log_id}_rb8001` 형식). 이를 통해 프론트엔드에서 피드백 전송 시 정확한 `conversation_log_id` 매칭이 가능해졌다. + > **원칙**: 피드백 API는 실패하더라도 사용자 경험을 깨지 않기 위해 항상 200을 반환하며, 내부 에러는 로그로만 남긴다. ---