docs: 함수명 정정 - handle_message가 아닌 route_message
- 실제 함수명: route_message (라인 77) - 최근 대화 조회: 라인 115-125에서 구현됨 - context 포함: 라인 132에서 recent_conversations 추가
This commit is contained in:
parent
5be05a3846
commit
107fd74b01
@ -35,15 +35,16 @@
|
|||||||
- 함수명: `get_recent_conversations(user_id, limit=10)`
|
- 함수명: `get_recent_conversations(user_id, limit=10)`
|
||||||
- 쿼리: `SELECT message, response, timestamp FROM conversation_logs WHERE user_id = %s ORDER BY timestamp DESC`
|
- 쿼리: `SELECT message, response, timestamp FROM conversation_logs WHERE user_id = %s ORDER BY timestamp DESC`
|
||||||
|
|
||||||
### 3.2 최종 해결 방안 - 기존 handle_message() 활용
|
### 3.2 최종 해결 방안 - 기존 route_message() 활용
|
||||||
- **최적 방안**: main.py 엔드포인트에서 `router.handle_message()` 호출
|
- **최적 방안**: main.py 엔드포인트에서 `router.route_message()` 호출
|
||||||
```python
|
```python
|
||||||
# main.py /api/message (Frontend)
|
# main.py /api/message (Frontend)
|
||||||
result = await router.handle_message(request.text, user_id, "frontend")
|
result = await router.route_message(request.text, user_id, "frontend")
|
||||||
|
|
||||||
# main.py /api/slack/events (Slack)
|
# main.py /api/slack/events (Slack)
|
||||||
result = await router.handle_message(message, user_id, "slack")
|
result = await router.route_message(message, user_id, "slack")
|
||||||
```
|
```
|
||||||
|
- **확인**: route_message (라인 77)에 최근 대화 조회 구현됨 (라인 115-125)
|
||||||
- **장점**: 이미 구현된 모든 기능 활용 (최근 대화 조회, 스킬 라우팅, 저장)
|
- **장점**: 이미 구현된 모든 기능 활용 (최근 대화 조회, 스킬 라우팅, 저장)
|
||||||
- **수정**: 단 2줄로 완료
|
- **수정**: 단 2줄로 완료
|
||||||
- **안전성**: 기존 테스트된 코드, channel 파라미터로 구분
|
- **안전성**: 기존 테스트된 코드, channel 파라미터로 구분
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user