mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 19:39:42 +08:00
* 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>
113 lines
3.4 KiB
Markdown
113 lines
3.4 KiB
Markdown
# Data Directory
|
|
|
|
This directory stores all data files for the AI-Tutor system, including knowledge bases, user data, logs, etc.
|
|
|
|
## 📁 Directory Structure
|
|
|
|
```
|
|
data/
|
|
├── knowledge_bases/ # Knowledge base storage
|
|
└── user/ # User activity data
|
|
├── solve/ # Problem-solving results
|
|
├── question/ # Generated questions
|
|
├── research/ # Research reports and cache
|
|
├── co_writer/ # Interactive IdeaGen documents
|
|
├── notebook/ # Notebook records
|
|
├── guide/ # Guided-learning sessions
|
|
└── run_code_workspace/ # Code execution workspace
|
|
```
|
|
|
|
## 📋 Directory Description
|
|
|
|
### knowledge_bases/
|
|
|
|
Stores all knowledge base data files for the AI-Tutor system.
|
|
|
|
### user/
|
|
|
|
Stores all user-generated data and output files.
|
|
|
|
#### solve/
|
|
|
|
Problem-solving module output directory containing results from problem-solving tasks.
|
|
|
|
#### question/
|
|
|
|
Question generation module output directory containing generated questions and validation results.
|
|
|
|
#### research/
|
|
|
|
Research module output directory containing research reports and cache data.
|
|
|
|
#### co_writer/
|
|
|
|
Co-Writer module output directory for interactive IdeaGen documents.
|
|
|
|
#### notebook/
|
|
|
|
Notebook data storage containing notebook records and indices.
|
|
|
|
#### guide/
|
|
|
|
Guided-learning module output directory containing learning session data.
|
|
|
|
#### run_code_workspace/
|
|
|
|
Code execution workspace for temporarily storing files generated by code execution.
|
|
|
|
## 🔧 Configuration
|
|
|
|
Data directory paths are configured in `config/main.yaml`:
|
|
|
|
```yaml
|
|
paths:
|
|
user_data_dir: "./data/user"
|
|
knowledge_bases_dir: "./data/knowledge_bases"
|
|
run_code_workspace_dir: "./data/user/run_code_workspace"
|
|
```
|
|
|
|
## 📝 Notes
|
|
|
|
1. **Backup Important Data**: Recommend regularly backing up `knowledge_bases/` and important user data
|
|
2. **Version Control**: Recommend adding `data/` directory to `.gitignore` to avoid committing large files
|
|
3. **Disk Space**: Knowledge bases and user data may occupy significant disk space, clean old data regularly
|
|
4. **Permission Management**: Ensure application has read/write permissions
|
|
5. **Path Consistency**: All modules use unified path configuration, avoid hardcoded paths
|
|
|
|
## 🔗 Related Modules
|
|
|
|
- **Knowledge Base Management**: `src/knowledge/` - Knowledge base creation, updates, queries
|
|
- **User Data**: Each functional module automatically manages its corresponding user data directory
|
|
- **Logging System**: `src/core/logging/` - Unified logging management
|
|
|
|
## 🛠️ Maintenance Operations
|
|
|
|
### Clean Old Data
|
|
|
|
```bash
|
|
# Clean old user data directories (customize based on retention policy)
|
|
# Replace the pattern with your actual naming convention, e.g.:
|
|
# find data/user -type d -regex '.*_[0-9]{8}.*' -mtime +30 -exec rm -rf {} \;
|
|
find data/user -type d -name "*_YYYYMMDD*" -mtime +30 -exec rm -rf {} \;
|
|
|
|
# Clean temporary workspace files
|
|
find data/user/run_code_workspace -type f -mtime +7 -delete
|
|
```
|
|
|
|
### Backup Knowledge Base
|
|
|
|
```bash
|
|
# Backup entire knowledge base directory
|
|
tar -czf knowledge_bases_backup_$(date +%Y%m%d).tar.gz data/knowledge_bases/
|
|
|
|
# Backup specific knowledge base
|
|
tar -czf kb_backup.tar.gz data/knowledge_bases/{kb_name}/
|
|
```
|
|
|
|
### Restore Knowledge Base
|
|
|
|
```bash
|
|
# Restore knowledge base
|
|
tar -xzf knowledge_bases_backup_20250101.tar.gz -C data/
|
|
```
|