Files
DeepTutor/docs/guide/getting-started.md
Scarlet Moore cddc5160e8 work/llm-error-framework (#35)
* 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>
2026-01-13 16:58:13 +11:00

150 lines
4.8 KiB
Markdown

# 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
```bash [Quick Install]
# 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:
```bash
# 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`:
```bash
# 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:
```bash
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](/guide/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.
<details>
<summary><b>Research Papers Collection</b> — 5 papers (20-50 pages each)</summary>
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](https://github.com/HKUDS/AI-Researcher) | [AutoAgent](https://github.com/HKUDS/AutoAgent) | [RAG-Anything](https://github.com/HKUDS/RAG-Anything) | [LightRAG](https://github.com/HKUDS/LightRAG) | [VideoRAG](https://github.com/HKUDS/VideoRAG)
</details>
<details>
<summary><b>Data Science Textbook</b> — 8 chapters, 296 pages</summary>
A comprehensive data science textbook with challenging content. This demo showcases **deep knowledge depth** for learning scenarios.
**Book Link**: [Deep Representation Learning Book](https://ma-lab-berkeley.github.io/deep-representation-learning-book/)
</details>
**Download and Setup:**
1. Download the demo package: [Google Drive](https://drive.google.com/drive/folders/1iWwfZXiTuQKQqUYb5fGDZjLCeTUP6DA6?usp=sharing)
2. Extract the compressed files directly into the `data/` directory
3. Knowledge bases will be automatically available once you start the system
> **Note:** Our **demo knowledge bases** use `text-embedding-3-large` with `dimensions = 3072`. Ensure your embeddings model has matching dimensions (3072) for compatibility.
## Step 6: Launch the Application
```bash
# 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.
1. **Access Knowledge Base**: Navigate to `http://localhost:3782/knowledge`
2. **Create New Base**: Click "New Knowledge Base"
3. **Configure Settings**: Enter a unique name for your knowledge base
4. **Upload Content**: Add single or multiple files for batch processing
5. **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 |
## Next Steps
- [Configuration →](/guide/configuration)
- [Troubleshooting →](/guide/troubleshooting)
- [Full Installation Guide →](https://github.com/HKUDS/DeepTutor#-getting-started)