* feat: enhance error handling and logging in DocumentAdder * feat: implement robust error handling utilities for API exceptions * style: fix formatting issues * feat: implement retry logic for LLM API calls to handle rate limits and timeouts * feat: enhance document validation and error handling in file uploads * feat: enhance valid tools configuration and error handling in project structure * feat: refactor error handling and validation functions for improved robustness * fix: pre-commit format * feat: implement configuration validation for tool consistency and enhance error handling in file uploads * feat: add exception hierarchy for LLM service errors to improve error handling * chore: update repo roster images [skip ci] * chore: update repo roster images [skip ci] * Integrate documentation updates and rebase onto upstream dev * Implement error handling utilities and validation functions * feat: implement multi-provider support with enhanced capability handling and model extraction * fix: enhance error handling and validation across multiple modules * chore: remove unused local environment configuration file * commit * fix: improve error handling and logging in utilities and error handler * fix: enhance error handling and logging across multiple modules * fix: enhance async initialization and validation in multiple modules * feat: implement LLM error framework - Add LLM-specific exception classes in exceptions.py - Create error mapping utilities for standardized error handling - Implement base provider interface with error handling - Add OpenAI provider implementation with error mapping - Define LLM types and response structures * feat: add missing registry and telemetry modules - Add registry.py for provider registration system - Add telemetry.py for basic LLM call tracking - Complete the LLM error framework implementation * fix(llm): safer sync wrapper + smarter retries + optional openai mapping * Fix LLM error framework and code quality improvements * feat: update environment configuration and improve logging in LLM services * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Refactor code structure for improved readability and maintainability * chore: update documentation, improve error handling, and enhance file upload validation * feat: enhance error handling and configuration validation across multiple modules * feat: add configuration for pytest, improve error handling, and enhance byte formatting utilities --------- Co-authored-by: scrrlt <smo0051@student.monash.edu> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
4.8 KiB
Quick Start
Get DeepTutor running in under 5 minutes.
Prerequisites
- Python 3.10+
- Node.js 18+
- An LLM API key (OpenAI, Anthropic, DeepSeek, etc.)
Installation
::: code-group
# Clone and setup
git clone https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
## Step 1: Set Up Virtual Environment (Choose One Option)
# Option A: Using conda (Recommended)
conda create -n aitutor python=3.10
conda activate aitutor
# Option B: Using venv
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
Step 2: Install Dependencies
Run the automated installation script to install all required dependencies:
# Recommended: Automated Installation
bash scripts/install_all.sh
# Alternative: Manual Installation
python scripts/install_all.py
# Or Install Dependencies Manually
pip install -r requirements.txt
npm install
Step 3: Set Up Environment Variables
Create a .env file in the project root directory based on .env.example:
# Copy from .env.example template (if exists)
cp .env.example .env
# Then edit .env file with your API keys
Step 4: Configure Ports and LLM Settings (Optional)
By default, the application uses:
- Backend (FastAPI):
8001 - Frontend (Next.js):
3782
You can modify these ports in your .env file:
BACKEND_PORT=8001
FRONTEND_PORT=3782
# For remote/LAN access, set your server's IP address:
# NEXT_PUBLIC_API_BASE=http://192.168.1.100:8001
LLM Configuration: Agent settings for temperature and max_tokens are centralized in config/agents.yaml. Each module (guide, solve, research, question, ideagen, co_writer) has customizable parameters. See Configuration for details.
Step 5: Try Our Demos (Optional)
Experience the system quickly with two pre-built knowledge bases and a collection of challenging questions with usage examples.
Research Papers Collection — 5 papers (20-50 pages each)
A curated collection of 5 research papers from our lab covering RAG and Agent fields. This demo showcases broad knowledge coverage for research scenarios.
Used Papers: AI-Researcher | AutoAgent | RAG-Anything | LightRAG | VideoRAG
Data Science Textbook — 8 chapters, 296 pages
A comprehensive data science textbook with challenging content. This demo showcases deep knowledge depth for learning scenarios.
Book Link: Deep Representation Learning Book
Download and Setup:
- Download the demo package: Google Drive
- Extract the compressed files directly into the
data/directory - Knowledge bases will be automatically available once you start the system
Note: Our demo knowledge bases use
text-embedding-3-largewithdimensions = 3072. Ensure your embeddings model has matching dimensions (3072) for compatibility.
Step 6: Launch the Application
# Activate virtual environment
conda activate aitutor # or: source venv/bin/activate
# Start web interface (frontend + backend)
python scripts/start_web.py
# Alternative: CLI interface only
python scripts/start.py
# Stop the service: Ctrl+C
Step 7: Create Your Own Knowledge Base
Create custom knowledge bases through the web interface with support for multiple file formats.
- Access Knowledge Base: Navigate to
http://localhost:3782/knowledge - Create New Base: Click "New Knowledge Base"
- Configure Settings: Enter a unique name for your knowledge base
- Upload Content: Add single or multiple files for batch processing
- Monitor Progress: Track processing status in the terminal running
start_web.py- Large files may take several minutes to complete
- Knowledge base becomes available once processing finishes
Tips: Large files may require several minutes to process. Multiple files can be uploaded simultaneously for efficient batch processing.
Access URLs
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3782 |
Main web interface |
| API Docs | http://localhost:8001/docs |
Interactive API documentation |
| Health | http://localhost:8001/api/v1/knowledge/health |
System health check |