mula.liu
|
e6c92551ea
|
Stage 2 & 3: Remove Graphy, integrate ZVec vectorization, and add knowledge base chat
## Changes
### Stage 2: ZVec Integration
- Created `zvec_service.py` for MD file vectorization with Aliyun ZVec
- Added `document_vector.py` model for storing embeddings
- Integrated ZVec into file operations (create/update/delete MD files)
- Added `create_document_vector_table.sql` migration
- Background vectorization on file save, removal on file delete
### Stage 3: Knowledge Base Chat
- Created `chat_session.py` model for chat sessions and messages
- Implemented `rag_service.py` for RAG (vector retrieval + LLM generation)
- Added `chat.py` API endpoints (create sessions, send messages, list history)
- Created `Chat.jsx` frontend component with project/model selection
- Added `chat.js` API client
- Chat route integrated into App.jsx
### Cleanup
- Removed all graphy-related files (graphy/, graphy.py, graphy_task.py, etc.)
- Removed BUILD_GRAPH from enums (no longer needed)
### Database
- Created migration script for chat tables (ChatSession, ChatMessage)
- Created migration script for document vectors
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
2026-06-23 21:58:16 +08:00 |