ViMedical là một hệ thống trợ lý y tế thông minh sử dụng AI để hỗ trợ chuẩn đoán bệnh và truy xuất thông tin y tế bằng tiếng Việt.
Vimedical/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── models/ # Data models
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── main.py # FastAPI app
│ ├── requirements.txt
│ └── run.py
├── frontend/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ └── styles/ # CSS styles
│ └── package.json
└── src/ # Original Streamlit code (legacy)
- Python 3.8+
- Node.js 16+
- npm hoặc yarn
# Di chuyển vào thư mục backend
cd backend
# Tạo virtual environment
python -m venv venv
# Kích hoạt virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Cài đặt dependencies
pip install -r requirements.txt
# Chạy server
python run.pyBackend sẽ chạy tại: http://localhost:8000
# Di chuyển vào thư mục frontend
cd frontend
# Cài đặt dependencies
npm install
# Chạy development server
npm startFrontend sẽ chạy tại: http://localhost:3000
Tạo file .env trong thư mục backend với các biến sau:
OPENROUTER_API_KEY=your_openrouter_api_key
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_api_keyGET /- Health checkPOST /api/v1/chat- Gửi tin nhắn chatGET /api/v1/health- Kiểm tra trạng thái hệ thốngPOST /api/v1/session/new- Tạo phiên chat mớiGET /api/v1/session/{session_id}/messages- Lấy tin nhắn của phiên
- Giao diện hiện đại: React với Material-UI
- Responsive design: Hỗ trợ mobile và desktop
- Dark/Light theme: Chuyển đổi theme
- Sidebar navigation: Quản lý phiên chat
- Real-time chat: Trò chuyện thời gian thực
- Medical diagnosis: Chuẩn đoán y tế bằng AI
- Vietnamese support: Hỗ trợ đầy đủ tiếng Việt
- FastAPI
- LangChain
- Qdrant Vector Database
- OpenAI/OpenRouter API
- Sentence Transformers
- React 18
- Material-UI (MUI)
- Axios
- React Router
- React Markdown
cd backend
python run.pycd frontend
npm startpip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000npm run build- Lỗi kết nối backend: Kiểm tra backend có đang chạy tại port 8000
- Lỗi API keys: Kiểm tra file .env có đúng keys
- Lỗi dependencies: Chạy lại
pip install -r requirements.txtvànpm install
- Fork dự án
- Tạo feature branch
- Commit changes
- Push to branch
- Tạo Pull Request
MIT License