Implement Phase 22: REST API (FastAPI + SSE streaming)

- api.py: FastAPI 앱 신규 생성
  - GET /health, POST /chat (SSE), POST /reset, POST /ingest, GET/DELETE /documents
  - SSE 포맷: data: <JSON 토큰>\n\n / data: [DONE]\n\n
  - Bearer Token 인증 (API_TOKEN 미설정 시 개발 모드)
  - user_id 파라미터로 멀티유저 지원 (기존 AgentService·DB 구조 재사용)
- config.py: api_token 필드 추가
- app.py: _get_agent에 query_rewrite_enabled 누락 수정
- requirements.txt: fastapi, uvicorn[standard], python-multipart 추가
- ROADMAP: Phase 22 , Telegram Bot 클라이언트 예시 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sal
2026-05-29 20:11:49 +09:00
parent 432cc9565c
commit 2e9e8a33fe
6 changed files with 176 additions and 33 deletions
+4
View File
@@ -14,6 +14,10 @@ qdrant-client>=1.9.0
pdfplumber>=0.11.0
# Phase 18 — Hybrid Search (BM25 sparse vectors)
fastembed>=0.3.0
# Phase 22 — REST API
fastapi>=0.100.0
uvicorn[standard]>=0.23.0
python-multipart>=0.0.7
# Phase 3 — Agent orchestration
langgraph>=1.0.0
# Phase 4 — Web UI