DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
docs: update website
Pancake814bed74527b
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mtsindex 0c3ad6381..ded8c15c5 100644--- a/docs/.vitepress/config.mts+++ b/docs/.vitepress/config.mts@@ -11,65 +11,107 @@ export default defineConfig({['link', { rel: 'icon', href: '/DeepTutor/logo.png' }]],- themeConfig: {- logo: '/logo.png',-- nav: [- { text: 'Home', link: '/' },- { text: 'Guide', link: '/guide/getting-started' },- { text: 'Features', link: '/features/overview' },- { text: 'Roadmap', link: '/roadmap' },- { text: 'Community', link: '/community/contributing' },- { text: 'GitHub', link: 'https://github.com/HKUDS/DeepTutor' }- ],-- sidebar: {- '/guide/': [- {- text: 'Guide',- items: [- { text: 'Getting Started', link: '/guide/getting-started' },- { text: 'Configuration', link: '/guide/configuration' },- { text: 'Troubleshooting', link: '/guide/troubleshooting' }- ]- }- ],- '/features/': [- {- text: 'Features',- items: [- { text: 'Overview', link: '/features/overview' }- ]- }- ],- '/community/': [- {- text: 'Community',- items: [- { text: 'Discussions', link: '/community/discussions' },- { text: 'Contributing', link: '/community/contributing' }+ // 国际化配置+ locales: {+ root: {+ label: 'English',+ lang: 'en',+ themeConfig: {+ nav: [+ { text: 'Home', link: '/' },+ { text: 'Guide', link: '/guide/getting-started' },+ { text: 'Features', link: '/features/overview' },+ { text: 'Roadmap', link: '/roadmap' },+ { text: 'GitHub', link: 'https://github.com/HKUDS/DeepTutor' }+ ],+ sidebar: {+ '/guide/': [+ {+ text: 'Guide',+ items: [+ { text: 'Quick Start', link: '/guide/getting-started' },+ { text: 'Configuration', link: '/guide/configuration' },+ { text: 'Troubleshooting', link: '/guide/troubleshooting' }+ ]+ }]+ },+ editLink: {+ pattern: 'https://github.com/HKUDS/DeepTutor/edit/main/docs/:path',+ text: 'Edit this page on GitHub'+ },+ footer: {+ message: 'Released under the AGPL-3.0 License.',+ copyright: '© 2025-2026 Data Intelligence Lab @ HKU'}- ],- '/roadmap': [- {- text: 'Roadmap',- items: [- { text: 'Roadmap', link: '/roadmap' }- ]- }- ]+ }},+ zh: {+ label: '简体中文',+ lang: 'zh-CN',+ link: '/zh/',+ themeConfig: {+ nav: [+ { text: '首页', link: '/zh/' },+ { text: '指南', link: '/zh/guide/getting-started' },+ { text: '功能', link: '/zh/features/overview' },+ { text: '路线图', link: '/zh/roadmap' },+ { text: 'GitHub', link: 'https://github.com/HKUDS/DeepTutor' }+ ],+ sidebar: {+ '/zh/guide/': [+ {+ text: '指南',+ items: [+ { text: '快速开始', link: '/zh/guide/getting-started' },+ { text: '配置说明', link: '/zh/guide/configuration' },+ { text: '常见问题', link: '/zh/guide/troubleshooting' }+ ]+ }+ ]+ },+ editLink: {+ pattern: 'https://github.com/HKUDS/DeepTutor/edit/main/docs/:path',+ text: '在 GitHub 上编辑此页'+ },+ footer: {+ message: '基于 AGPL-3.0 许可证发布',+ copyright: '© 2025-2026 香港大学数据智能实验室'+ },+ // 中文界面文本+ outline: {+ label: '本页目录'+ },+ docFooter: {+ prev: '上一篇',+ next: '下一篇'+ },+ lastUpdated: {+ text: '最后更新于'+ },+ darkModeSwitchLabel: '外观',+ sidebarMenuLabel: '菜单',+ returnToTopLabel: '返回顶部',+ langMenuLabel: '切换语言'+ }+ }+ },++ themeConfig: {+ logo: '/logo.png',socialLinks: [- { icon: 'github', link: 'https://github.com/HKUDS/DeepTutor' }+ { icon: 'github', link: 'https://github.com/HKUDS/DeepTutor' },+ { icon: 'discord', link: 'https://discord.gg/zpP9cssj' },+ {+ icon: {+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.32.32 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.49.49 0 0 1 .176-.554C23.048 18.276 24 16.577 24 14.71c0-3.38-3.251-6.136-7.062-5.852zm-2.073 2.703c.536 0 .97.44.97.983a.976.976 0 0 1-.97.983.976.976 0 0 1-.97-.983c0-.542.434-.983.97-.983zm4.146 0c.536 0 .97.44.97.983a.976.976 0 0 1-.97.983.976.976 0 0 1-.97-.983c0-.542.434-.983.97-.983z"/></svg>'+ },+ link: 'https://github.com/HKUDS/DeepTutor/issues/78',+ ariaLabel: 'WeChat'+ }],- footer: {- message: 'Released under the AGPL-3.0 License.',- copyright: 'Copyright © 2025-2026 DeepTutor Team @ HKU'- },-search: {provider: 'local'}diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.cssnew file mode 100644index 000000000..3b671ad35--- /dev/null+++ b/docs/.vitepress/theme/custom.css@@ -0,0 +1,47 @@+/* Roadmap 导航标签特殊样式 - 更显眼 & 独立 */+.VPNavBarMenuLink[href="/DeepTutor/roadmap"],+.VPNavScreenMenuLink[href="/DeepTutor/roadmap"] {+ position: relative;+ color: white !important;+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ padding: 6px 16px !important; /* 稍微加宽 padding */+ border-radius: 20px;+ font-weight: 700 !important;+ margin-left: 24px !important; /* 增加左侧间距,制造独立感 */+ transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);+ box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.2), 0 2px 4px -1px rgba(102, 126, 234, 0.1);+ letter-spacing: 0.5px;+}++/* 强制覆盖可能的默认样式 */+.VPNavBarMenuLink[href="/DeepTutor/roadmap"]:hover,+.VPNavScreenMenuLink[href="/DeepTutor/roadmap"]:hover {+ background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;+ transform: translateY(-2px);+ box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.3), 0 4px 6px -2px rgba(102, 126, 234, 0.1);+}++.VPNavBarMenuLink[href="/DeepTutor/roadmap"]::before,+.VPNavScreenMenuLink[href="/DeepTutor/roadmap"]::before {+ content: '🚀';+ margin-right: 6px;+ font-size: 1.1em;+ vertical-align: -1px;+}++/* 活跃状态 */+.VPNavBarMenuLink[href="/DeepTutor/roadmap"].active,+.VPNavBarMenuLink[href="/DeepTutor/roadmap"].VPLink--active {+ background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%) !important; /* 深紫色 */+ box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);+}++/* 移动端样式优化 */+@media (max-width: 768px) {+ .VPNavScreenMenuLink[href="/DeepTutor/roadmap"] {+ display: inline-flex;+ align-items: center;+ margin: 12px 0 12px 12px;+ width: auto;+ }+}diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.tsnew file mode 100644index 000000000..42fe9a936--- /dev/null+++ b/docs/.vitepress/theme/index.ts@@ -0,0 +1,4 @@+import DefaultTheme from 'vitepress/theme'+import './custom.css'++export default DefaultThemediff --git a/docs/community/contributing.md b/docs/community/contributing.mddeleted file mode 100644index 3372c9f7e..000000000--- a/docs/community/contributing.md+++ /dev/null@@ -1,150 +0,0 @@-# Contributing--Thank you for your interest in contributing to DeepTutor! That means a lot for our team! 🎉--You can join our [Discord community](https://discord.gg/aka9p9EW) for further discussion.--## Ways to Contribute--- 🐛 **Report bugs** — Open an issue with reproduction steps-- 💡 **Suggest features** — Share your ideas in discussions-- 📖 **Improve docs** — Fix typos, add examples-- 🔧 **Submit PRs** — Code contributions welcome!--## 🔄 Pull Request Process--1. **Create a branch**: `git checkout -b feature/your-feature`-2. **Make changes**: Follow existing code style and conventions-3. **Test locally**: Ensure your changes work correctly-4. **Run pre-commit**: `pre-commit run --all-files` ⚠️ **Required before PR!**-5. **Commit**: Pre-commit hooks will auto-format your code-6. **Push & PR**: Open a pull request with a clear description--## Development Setup--### 1. Fork and Clone--```bash-git clone https://github.com/YOUR_USERNAME/DeepTutor.git-cd DeepTutor-```--### 2. Set Up Environment--```bash-# Using conda (recommended)-conda create -n aitutor python=3.10-conda activate aitutor--# Or using venv-python -m venv venv-source venv/bin/activate # Windows: venv\Scripts\activate-```--### 3. Install Dependencies--```bash-# Automated installation (recommended)-bash scripts/install_all.sh--# Or manual installation-pip install -r requirements.txt-npm install-```--### 4. Install Pre-commit Hooks--```bash-# Install pre-commit-pip install pre-commit--# Install Git hooks-pre-commit install--# (Optional) Run checks on all files-pre-commit run --all-files-```--> After installing Git hooks, they will run **automatically** on every commit — no need to remember!--## 🛠️ Code Quality Tools--We use automated tools to maintain code quality:--| Tool | Purpose | Configuration |-|------|---------|---------------|-| **Ruff** | Python linting & formatting | `pyproject.toml` |-| **Prettier** | Frontend code formatting | `web/.prettierrc.json` |-| **detect-secrets** | Security check | `.secrets.baseline` |--::: warning IMPORTANT-**Before submitting a PR, you MUST run:** `pre-commit run --all-files`--CI will automatically check this and **reject PRs** that fail pre-commit checks.-:::--Every time you run `git commit`, pre-commit hooks will automatically:-- Format Python code with Ruff-- Format frontend code with Prettier-- Check for syntax errors-- Validate YAML/JSON files-- Detect potential security issues--> **Note**: The project uses **Ruff format** instead of Black to avoid formatting conflicts.--## Common Commands--```bash-# Normal commit (hooks run automatically if installed)-git commit -m "Your commit message"--# Manually check all files (do this before pushing!)-pre-commit run --all-files--# Update hooks to latest versions-pre-commit autoupdate--# Skip hooks (not recommended, only for emergencies)-git commit --no-verify -m "Emergency fix"-```--## 📋 Commit Message Format--```-<type>: <short description>--[optional body]--[optional footer(s)]-```--**Types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`--**Examples**:-- `feat`: for a new feature (MINOR version bump)-- `fix`: for a bug fix (PATCH version bump)-- `docs`: for documentation-only changes-- `style`: for formatting changes (whitespace, semicolons)-- `refactor`: for code changes that neither fix a bug nor add a feature-- `test`: for adding or correcting tests-- `chore`: for routine tasks (build processes, dependencies)--## Reporting Issues--- Use GitHub Issues to report bugs or suggest features-- Provide detailed information about the issue-- Include steps to reproduce if it's a bug--## Code of Conduct--Please be respectful and inclusive. We're building a welcoming community for learners and contributors alike.--## Questions?--- Open a [GitHub Discussion](https://github.com/HKUDS/DeepTutor/discussions)-- Join our [Discord Community](https://discord.gg/aka9p9EW)-- Check existing issues for similar questions-------### Let's build a tutoring system for the whole community TOGETHER! 🚀diff --git a/docs/community/discussions.md b/docs/community/discussions.mddeleted file mode 100644index 0b775110a..000000000--- a/docs/community/discussions.md+++ /dev/null@@ -1,37 +0,0 @@-# Discussions--Join the conversation! We've opened [GitHub Discussions](https://github.com/HKUDS/DeepTutor/discussions) as a space for the community to share ideas, ask questions, and collaborate.--## 🔥 Active Discussions--### 📢 General--| Topic | Description |-|-------|-------------|-| [What's your vision for DeepTutor?](https://github.com/HKUDS/DeepTutor/discussions/categories/general) | Share your thoughts on where DeepTutor should go next! |--### 💡 Ideas--| Topic | Label | Description |-|-------|-------|-------------|-| [[RFC] Decoupling RAG Modules](https://github.com/HKUDS/DeepTutor/discussions/categories/ideas) | `help wanted` | Proposal for modular RAG architecture — we'd love your input! |--## Discussion Categories--- **📣 Announcements** — Official updates from the team-- **💬 General** — General chat about DeepTutor-- **💡 Ideas** — Feature requests and suggestions-- **📊 Polls** — Community polls and voting-- **🙏 Q&A** — Ask questions and get answers-- **🙌 Show and tell** — Share what you've built with DeepTutor--## How to Participate--1. Visit our [GitHub Discussions](https://github.com/HKUDS/DeepTutor/discussions)-2. Browse existing topics or start a new discussion-3. Upvote ideas you like-4. Share your feedback and experiences-------💬 Your voice matters — come join the discussion!diff --git a/docs/features/overview.md b/docs/features/overview.mdindex fe1caaa1b..8ed2c0846 100644--- a/docs/features/overview.md+++ b/docs/features/overview.md@@ -1,162 +1,57 @@-# 🏛️ DeepTutor's Framework+# Features-<img src="/full-pipe.png" alt="DeepTutor Full-Stack Workflow" width="100%">+DeepTutor provides six specialized modules for AI-powered learning.-### 💬 User Interface Layer-• **Intuitive Interaction**: Simple bidirectional query-response flow for intuitive interaction.-• **Structured Output**: Structured response generation that organizes complex information into actionable outputs.-• **Dark/Light Mode**: System-wide theme support with automatic system preference detection.-• **Collapsible Sidebar**: Compact navigation with icon-only mode for focused learning.+<div class="feature-nav">-### 🤖 Intelligent Agent Modules-• **Problem Solving & Assessment**: Step-by-step problem solving and custom assessment generation.-• **Research & Learning**: Deep Research for topic exploration and Guided Learning with visualization.-• **Idea Generation**: Automated and interactive concept development with multi-source insights.+## Core Modules-### 🔧 Tool Integration Layer-• **Information Retrieval**: RAG hybrid retrieval, real-time web search, and academic paper databases.-• **Processing & Analysis**: Python code execution, query item lookup, and PDF parsing for document analysis.-• **Multi-Provider Support**: Flexible LLM providers (OpenAI, Anthropic, Ollama, etc.) and embedding adapters (OpenAI, Jina, Cohere, Ollama, etc.).+| Module | Description | Documentation |+|:-------|:------------|:--------------|+| 🧠 **Smart Solver** | Multi-agent problem solving with dual-loop reasoning | [Details →](https://github.com/HKUDS/DeepTutor#-smart-solver) |+| 🎯 **Question Generator** | Custom quiz generation & exam style mimicking | [Details →](https://github.com/HKUDS/DeepTutor#-question-generator) |+| 🎓 **Guided Learning** | Personalized learning paths with interactive visualization | [Details →](https://github.com/HKUDS/DeepTutor#-guided-learning) |+| 🔬 **Deep Research** | Systematic topic exploration with dynamic topic queue | [Details →](https://github.com/HKUDS/DeepTutor#-deep-research) |+| 💡 **IdeaGen** | Automated research idea generation with multi-stage filtering | [Details →](https://github.com/HKUDS/DeepTutor#-automated-ideagen) |+| ✏️ **Co-Writer** | AI-assisted writing with TTS narration | [Details →](https://github.com/HKUDS/DeepTutor#-interactive-ideagen-co-writer) |-### 🧠 Knowledge & Memory Foundation-• **Knowledge Graph**: Entity-relation mapping for semantic connections and knowledge discovery.-• **Vector Store**: Embedding-based semantic search for intelligent content retrieval.-• **Memory System**: Session state management and citation tracking for contextual continuity.+## Architecture------# Key Features of DeepTutor--## 📚 Massive Document Knowledge Q&A--• **Smart Knowledge Base**: Upload textbooks, research papers, technical manuals, and domain-specific documents. Build a comprehensive AI-powered knowledge repository for instant access.--• **Multi-Agent Problem Solving**: Dual-loop reasoning architecture with RAG, web search, paper search, and code execution—delivering step-by-step solutions with precise citations.--## 🎨 Interactive Learning Visualization+<img src="/full-pipe.png" alt="DeepTutor Architecture" style="width: 100%; border-radius: 8px; margin: 24px 0;">-• **Knowledge Simplification & Explanations**: Transform complex concepts, knowledge, and algorithms into easy-to-understand visual aids, detailed step-by-step breakdowns, and engaging interactive demonstrations.+### System Layers-• **Personalized Q&A**: Context-aware conversations that adapt to your learning progress, with interactive pages and session-based knowledge tracking.+- **User Interface** — Bidirectional query-response with structured output+- **Agent Modules** — Specialized AI agents for each learning task+- **Tool Integration** — RAG, web search, paper search, code execution+- **Knowledge Foundation** — Knowledge graph + vector store + memory system-## 🎯 Knowledge Reinforcement with Practice Problem Generator+</div>-• **Intelligent Exercise Creation**: Generate targeted quizzes, practice problems, and customized assessments tailored to your current knowledge level and specific learning objectives.+## Provider Support-• **Authentic Exam Simulation**: Upload reference exams to generate practice questions that perfectly match the original style, format, and difficulty—giving you realistic preparation for the actual test.+DeepTutor works with multiple LLM and embedding providers:-## 🔍 Deep Research & Idea Generation+::: details LLM Providers+- OpenAI (GPT-4o, GPT-4)+- Anthropic (Claude 3.5)+- Azure OpenAI+- DeepSeek+- Groq+- OpenRouter+- Ollama (local)+- Google Gemini+:::-• **Comprehensive Research & Literature Review**: Conduct in-depth topic exploration with systematic analysis. Identify patterns, connect related concepts across disciplines, and synthesize existing research findings.--• **Novel Insight Discovery**: Generate structured learning materials and uncover knowledge gaps. Identify promising new research directions through intelligent cross-domain knowledge synthesis.+::: details Embedding Providers+- OpenAI+- Jina AI+- Cohere+- Ollama+- LM Studio+- HuggingFace+:::----<!-- Core Learning Experience -->--<table>-<tr>-<td width="50%" align="center" valign="top">--### 📚 Massive Document Knowledge Q&A--<img src="/solve.gif" width="100%">--Document Q&A and Step-by-Step Problem Solving--</td>-<td width="50%" align="center" valign="top">--### 🎨 Interactive Learning Visualization--<img src="/guided-learning.gif" width="100%">--Interactive AI Learning with Knowledge Visual Explanations--</td>-</tr>-</table>--<!-- Practice & Reinforcement -->--### 🎯 Knowledge Reinforcement--<table>-<tr>-<td width="50%" valign="top" align="center">--<img src="/question-1.gif" width="100%">--**Custom Questions**-Auto-Validated Practice Questions with Instant Feedback--</td>-<td width="50%" valign="top" align="center">--<img src="/question-2.gif" width="100%">--**Mimic Questions**-Clone Exam Style for Authentic Practice--</td>-</tr>-</table>--<!-- Research & Creation -->--### 🔍 Deep Research & Idea Generation--<table>-<tr>-<td width="33%" align="center">--<img src="/deepresearch.gif" width="100%">--**Deep Research**-Web and Paper Search with Literature Review--</td>-<td width="33%" align="center">--<img src="/ideagen.gif" width="100%">--**Automated IdeaGen**-Systematic Brainstorming and Concept Synthesis--</td>-<td width="33%" align="center">--<img src="/co-writer.gif" width="100%">--**Interactive IdeaGen**-RAG-powered Idea Generation with Multi-Source Insights--</td>-</tr>-</table>--<!-- Knowledge Infrastructure -->--### 🏗️ All-in-One Knowledge System--<table>-<tr>-<td width="50%" align="center">--<img src="/knowledge_bases.png" width="100%">--**Personal Knowledge Base**-Build and Organize Your Own Knowledge Repository--</td>-<td width="50%" align="center">--<img src="/notebooks.png" width="100%">--**Personal Notebook**-Your Contextual Memory for Learning Sessions--</td>-</tr>-</table>+📖 **Full documentation**: [GitHub README](https://github.com/HKUDS/DeepTutor)diff --git a/docs/guide/configuration.md b/docs/guide/configuration.mdindex e7f729ddf..bcef38f54 100644--- a/docs/guide/configuration.md+++ b/docs/guide/configuration.md@@ -1,190 +1,81 @@# Configuration-DeepTutor uses YAML configuration files and environment variables for easy customization.--## 📁 Configuration Files--```-config/-├── main.yaml # Main system configuration (paths, tools, module settings)-├── agents.yaml # Unified agent parameters (temperature, max_tokens)-└── README.md # Full documentation-```+## Config Files| File | Purpose |-|------|---------|+|:-----|:--------|+| `.env` | API keys, ports, providers |+| `config/agents.yaml` | LLM parameters (temperature, max_tokens) || `config/main.yaml` | Paths, tools, module settings |-| `config/agents.yaml` | LLM parameters for each agent module |-| `.env` | API keys, server ports, and service configuration |-## 🔧 Server Configuration+## Environment Variables-Server ports are configured in `.env` file:+### Required```bash-# Backend API port (default: 8001)-BACKEND_PORT=8001+# LLM+LLM_MODEL=gpt-4o+LLM_API_KEY=your_api_key+LLM_HOST=https://api.openai.com/v1-# Frontend web port (default: 3782)-FRONTEND_PORT=3782+# Embedding+EMBEDDING_MODEL=text-embedding-3-large+EMBEDDING_API_KEY=your_api_key+EMBEDDING_HOST=https://api.openai.com/v1+EMBEDDING_DIMENSION=3072```-System language is configured in `config/main.yaml`:+### Optional-```yaml-system:- language: en # "zh" or "en"+```bash+# Server ports (defaults: 8001/3782)+BACKEND_PORT=8001+FRONTEND_PORT=3782++# Remote access+NEXT_PUBLIC_API_BASE=http://your-server-ip:8001++# Web search+SEARCH_PROVIDER=perplexity # or: baidu+PERPLEXITY_API_KEY=your_key++# TTS+TTS_MODEL=+TTS_URL=+TTS_API_KEY=```-## 🤖 Agent LLM Configuration+## Agent Parameters-Each module has unified LLM settings in `config/agents.yaml`:+Edit `config/agents.yaml`:```yaml-# Solve Module - Problem solving agentssolve:temperature: 0.3max_tokens: 8192-# Research Module - Deep research agentsresearch:temperature: 0.5max_tokens: 12000-# Question Module - Question generation agentsquestion:temperature: 0.7max_tokens: 4096--# Guide Module - Learning guidance agents-guide:- temperature: 0.5- max_tokens: 8192--# IdeaGen Module - Idea generation agents-ideagen:- temperature: 0.7- max_tokens: 4096--# CoWriter Module - Collaborative writing agents-co_writer:- temperature: 0.7- max_tokens: 4096```-## 🔑 Environment Variables--Create a `.env` file based on `.env.example`:--```bash-# ============================================================================-# Server Configuration-# ============================================================================-BACKEND_PORT=8001 # Backend API port-FRONTEND_PORT=3782 # Frontend web port--# For remote/LAN access - set to your server's IP address-# Example: http://192.168.1.100:8001 (if not set, defaults to localhost)-# NEXT_PUBLIC_API_BASE=http://your-server-ip:8001--# ============================================================================-# LLM (Large Language Model) Configuration - Required-# ============================================================================-LLM_BINDING=openai # Provider type (see supported list below)-LLM_MODEL=gpt-4o # e.g., gpt-4o, deepseek-chat, qwen-plus-LLM_HOST=https://api.openai.com/v1-LLM_API_KEY=your_api_key-DISABLE_SSL_VERIFY=false # Set true for self-signed certificates--# ============================================================================-# Embedding Model Configuration - Required for Knowledge Base-# ============================================================================-EMBEDDING_BINDING=openai # Provider type (see supported list below)-EMBEDDING_MODEL=text-embedding-3-large # e.g., text-embedding-3-large, nomic-embed-text-EMBEDDING_DIMENSION=3072 # Important! Must match model dimensions-EMBEDDING_HOST=https://api.openai.com/v1-EMBEDDING_API_KEY=your_api_key--# ============================================================================-# Web Search Configuration - Optional-# ============================================================================-SEARCH_PROVIDER=perplexity # Options: perplexity, baidu-PERPLEXITY_API_KEY=your_perplexity_key-BAIDU_API_KEY=your_baidu_key # For Baidu AI Search (百度AI搜索)--# ============================================================================-# TTS (Text-to-Speech) Configuration - Optional-# ============================================================================-TTS_MODEL=-TTS_URL=-TTS_API_KEY=-```--## 🔌 Supported Providers--### LLM Providers--| Provider | `LLM_BINDING` Value | Notes |-|:---------|:--------------------|:------|-| OpenAI | `openai` | GPT-4o, GPT-4, GPT-3.5, etc. |-| Anthropic | `anthropic` | Claude 3.5, Claude 3, etc. |-| Azure OpenAI | `azure_openai` | Enterprise deployments |-| Ollama | `ollama` | Local models (auto adds `/v1` suffix) |-| Groq | `groq` | Fast inference |-| OpenRouter | `openrouter` | Multi-model gateway |-| DeepSeek | `deepseek` | DeepSeek-V3, DeepSeek-R1 |-| Google Gemini | `gemini` | OpenAI-compatible mode |--### Embedding Providers--| Provider | `EMBEDDING_BINDING` Value | Notes |-|:---------|:--------------------------|:------|-| OpenAI | `openai` | text-embedding-3-large/small |-| Azure OpenAI | `azure_openai` | Enterprise deployments |-| Jina AI | `jina` | jina-embeddings-v3 |-| Cohere | `cohere` | embed-v3 series |-| Ollama | `ollama` | Local embedding models |-| LM Studio | `lm_studio` | Local inference server |-| HuggingFace | `huggingface` | OpenAI-compatible endpoints |--> **Note**: Please make sure you have configured the correct `EMBEDDING_DIMENSION`. Currently our RAG module uses RAG-Anything, you could further check [its repo](https://github.com/HKUDS/RAG-Anything) for more questions.--## 🛠️ Tool Configuration--Configure tool availability in `config/main.yaml`:--```yaml-tools:- rag_tool:- kb_base_dir: ./data/knowledge_bases- default_kb: ai_textbook- run_code:- workspace: ./data/user/run_code_workspace- web_search:- enabled: true # Global switch for web search- query_item:- enabled: true- max_results: 5-```--## 📂 Data Storage--All user content and system data are stored in the `data/` directory:+## Data Locations```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- ├── logs/ # System logs- └── run_code_workspace/ # Code execution workspace+├── knowledge_bases/ # Your uploaded documents+└── user/+ ├── solve/ # Problem solving outputs+ ├── question/ # Generated questions+ ├── research/ # Research reports+ ├── guide/ # Learning sessions+ └── logs/ # System logs```-## 🔗 Advanced Configuration+----For the full configuration reference, see [config/README.md](https://github.com/HKUDS/DeepTutor/tree/main/config).+📖 **Full reference**: [config/README.md](https://github.com/HKUDS/DeepTutor/tree/main/config)diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.mdindex 5bdfea2de..7842c3b0b 100644--- a/docs/guide/getting-started.md+++ b/docs/guide/getting-started.md@@ -1,139 +1,78 @@-# 🚀 Quick Start+# Quick Start-## Step 1: Clone Repository and Set Up Environment+Get DeepTutor running in under 5 minutes.-```bash-# Clone the repository-git clone https://github.com/HKUDS/DeepTutor.git-cd DeepTutor+## Prerequisites-# Set Up Virtual Environment (Choose One Option)+- Python 3.10++- Node.js 18++- An LLM API key (OpenAI, Anthropic, DeepSeek, etc.)-# Option A: Using conda (Recommended)-conda create -n aitutor python=3.10-conda activate aitutor+## Installation-# Option B: Using venv-python -m venv venv-# On Windows:-venv\Scripts\activate-# On macOS/Linux:-source venv/bin/activate-```+::: code-group-## Step 2: Install Dependencies+```bash [Quick Install]+# Clone and setup+git clone https://github.com/HKUDS/DeepTutor.git+cd DeepTutor-Run the automated installation script to install all required dependencies:+# Configure API keys+cp .env.example .env+# Edit .env with your API keys-```bash-# Recommended: Automated Installation+# Install and launchbash scripts/install_all.sh--# Alternative: Manual Installation-python scripts/install_all.py--# Or Install Dependencies Manually-pip install -r requirements.txt-npm install+python scripts/start_web.py```-## 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+```bash [Docker]+docker run -d --name deeptutor \+ -p 8001:8001 -p 3782:3782 \+ -e LLM_MODEL=gpt-4o \+ -e LLM_API_KEY=your-key \+ -e LLM_HOST=https://api.openai.com/v1 \+ -e EMBEDDING_MODEL=text-embedding-3-large \+ -e EMBEDDING_API_KEY=your-key \+ -e EMBEDDING_HOST=https://api.openai.com/v1 \+ ghcr.io/hkuds/deeptutor:latest```-## 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:+## Essential `.env` Variables```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+# Required+LLM_MODEL=gpt-4o+LLM_API_KEY=your_api_key+LLM_HOST=https://api.openai.com/v1++EMBEDDING_MODEL=text-embedding-3-large+EMBEDDING_API_KEY=your_api_key+EMBEDDING_HOST=https://api.openai.com/v1```-## Step 7: Create Your Own Knowledge Base+> 📖 **Full configuration options**: See [Configuration](/guide/configuration) or [README](https://github.com/HKUDS/DeepTutor#step-1-pre-configuration)-Create custom knowledge bases through the web interface with support for multiple file formats.+## Access Points-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+| Service | URL |+|:--------|:----|+| **Web App** | http://localhost:3782 |+| **API Docs** | http://localhost:8001/docs |-> **Tips:** Large files may require several minutes to process. Multiple files can be uploaded simultaneously for efficient batch processing.+## Your First Knowledge Base-## Access URLs+1. Navigate to http://localhost:3782/knowledge+2. Click **"New Knowledge Base"**+3. Upload PDF, TXT, or Markdown files+4. Wait for processing to complete-| 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 |+That's it! Start exploring with the **Solver**, **Question Generator**, or **Deep Research** modules.## Next Steps-- [Configuration](/guide/configuration) — Customize your setup-- [Features Overview](/features/overview) — Explore all features-- [Troubleshooting](/guide/troubleshooting) — Common issues and solutions+- [Configuration →](/guide/configuration)+- [Troubleshooting →](/guide/troubleshooting)+- [Full Installation Guide →](https://github.com/HKUDS/DeepTutor#-getting-started)diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.mdindex c1b5c3b73..bd217ef22 100644--- a/docs/guide/troubleshooting.md+++ b/docs/guide/troubleshooting.md@@ -1,171 +1,48 @@-# ❓ FAQ+# Troubleshooting-## Backend fails to start?+Quick solutions for common issues.-**Checklist**-- Confirm Python version >= 3.10-- Confirm all dependencies installed: `pip install -r requirements.txt`-- Check if port 8001 is in use (configurable in `config/main.yaml`)-- Check `.env` file configuration+## Startup Issues-**Solutions**-- **Change port**: Edit `config/main.yaml` server.backend_port-- **Check logs**: Review terminal error messages+| Problem | Solution |+|:--------|:---------|+| Backend fails to start | Check Python ≥ 3.10, verify `.env` config |+| `npm: command not found` | Install Node.js: `conda install -c conda-forge nodejs` |+| Port already in use | Kill process: `lsof -i :8001` → `kill -9 <PID>` |----+## Connection Issues-## Port occupied after Ctrl+C?+| Problem | Solution |+|:--------|:---------|+| Frontend can't reach backend | Verify backend at http://localhost:8001/docs |+| WebSocket fails | Check firewall, confirm `ws://localhost:8001/api/v1/...` format |+| Remote access fails | Set `NEXT_PUBLIC_API_BASE=http://your-ip:8001` in `.env` |-**Problem**+## Docker Issues-After pressing Ctrl+C during a running task (e.g., deep research), restarting shows "port already in use" error.+| Problem | Solution |+|:--------|:---------|+| Cloud frontend won't connect | Set `NEXT_PUBLIC_API_BASE_EXTERNAL=https://your-server:8001` |+| Wrong architecture | Check with `uname -m`: use `:latest` (AMD64) or `:latest-arm64` (ARM) |-**Cause**+## Knowledge Base-Ctrl+C sometimes only terminates the frontend process while the backend continues running in the background.+| Problem | Solution |+|:--------|:---------|+| Processing stuck | Check terminal logs, verify API keys |+| `uvloop.Loop` error | Run: `./scripts/extract_numbered_items.sh <kb_name>` |-**Solution**+## Kill Background Processes```bash-# macOS/Linux: Find and kill the process-lsof -i :8001-kill -9 <PID>+# macOS/Linux+lsof -i :8001 && kill -9 <PID>-# Windows: Find and kill the process+# Windowsnetstat -ano | findstr :8001taskkill /PID <PID> /F```-Then restart the service with `python scripts/start_web.py`.-------## npm: command not found error?--**Problem**--Running `scripts/start_web.py` shows `npm: command not found` or exit status 127.--**Checklist**-- Check if npm is installed: `npm --version`-- Check if Node.js is installed: `node --version`-- Confirm conda environment is activated (if using conda)--**Solutions**-```bash-# Option A: Using Conda (Recommended)-conda install -c conda-forge nodejs--# Option B: Using Official Installer-# Download from https://nodejs.org/--# Option C: Using nvm-nvm install 18-nvm use 18-```--**Verify Installation**-```bash-node --version # Should show v18.x.x or higher-npm --version # Should show version number-```-------## Frontend cannot connect to backend?--**Checklist**-- Confirm backend is running (visit `http://localhost:8001/docs`)-- Check browser console for error messages--**Solution**--Create `.env.local` in `web` directory:--```bash-NEXT_PUBLIC_API_BASE=http://localhost:8001-```-------## WebSocket connection fails?--**Checklist**-- Confirm backend is running-- Check firewall settings-- Confirm WebSocket URL is correct--**Solution**-- **Check backend logs**-- **Confirm URL format**: `ws://localhost:8001/api/v1/...`-------## Where are module outputs stored?--| Module | Output Path |-|:---:|:---|-| Solve | `data/user/solve/solve_YYYYMMDD_HHMMSS/` |-| Question | `data/user/question/question_YYYYMMDD_HHMMSS/` |-| Research | `data/user/research/reports/` |-| Interactive IdeaGen | `data/user/co-writer/` |-| Notebook | `data/user/notebook/` |-| Guide | `data/user/guide/session_{session_id}.json` |-| Logs | `data/user/logs/` |-------## How to add a new knowledge base?--**Web Interface**-1. Visit `http://localhost:3782/knowledge`-2. Click "New Knowledge Base"-3. Enter knowledge base name-4. Upload PDF/TXT/MD documents-5. System will process documents in background--**CLI**-```bash-python -m src.knowledge.start_kb init <kb_name> --docs <pdf_path>-```-------## How to incrementally add documents to existing KB?--**CLI (Recommended)**-```bash-python -m src.knowledge.add_documents <kb_name> --docs <new_document.pdf>-```--**Benefits**-- Only processes new documents, saves time and API costs-- Automatically merges with existing knowledge graph-- Preserves all existing data-----## Numbered items extraction failed with uvloop.Loop error?--**Problem**--When initializing a knowledge base, you may encounter this error:-```-ValueError: Can't patch loop of type <class 'uvloop.Loop'>-```--This occurs because Uvicorn uses `uvloop` event loop by default, which is incompatible with `nest_asyncio`.--**Solution**--Use one of the following methods to extract numbered items:--```bash-# Option 1: Using the shell script (recommended)-./scripts/extract_numbered_items.sh <kb_name>--# Option 2: Direct Python command-python src/knowledge/extract_numbered_items.py --kb <kb_name> --base-dir ./data/knowledge_bases-```--This will extract numbered items (Definitions, Theorems, Equations, etc.) from your knowledge base without reinitializing it.+📖 **Full FAQ**: [GitHub README](https://github.com/HKUDS/DeepTutor#-faq)diff --git a/docs/index.md b/docs/index.mdindex dffa077fc..8ce7bda94 100644--- a/docs/index.md+++ b/docs/index.md@@ -3,66 +3,85 @@ layout: homehero:name: "DeepTutor"- text: "AI-Powered Personalized Learning"- tagline: Multi-Agent Architecture for Adaptive Education with Knowledge Graph Integration+ text: "Your AI Learning Companion"+ tagline: Transform any document into an interactive learning experienceimage:src: /logo.pngalt: DeepTutoractions:- theme: brand- text: Get Started+ text: Quick Start →link: /guide/getting-started- theme: alt- text: View on GitHub+ text: GitHublink: https://github.com/HKUDS/DeepTutor+ - theme: alt+ text: 🚀 Roadmap+ link: /roadmapfeatures:- - icon: 📚- title: Massive Document Q&A- details: Upload textbooks, papers, and manuals. Build AI-powered knowledge repositories with RAG and knowledge graph integration.- - icon: 🎨- title: Interactive Visualization- details: Transform complex concepts into visual aids with step-by-step breakdowns and engaging interactive demonstrations.- icon: 🧠- title: Smart Problem Solver- details: Dual-loop reasoning with RAG, web search, paper search, and code execution for step-by-step solutions.+ title: Smart Problem Solving+ details: Dual-loop reasoning with step-by-step solutions and precise citations from your documents.- icon: 🎯title: Practice Generator- details: Generate targeted quizzes and practice problems. Upload reference exams to mimic original style and difficulty.+ details: Generate custom quizzes or mimic real exams from your uploaded materials.+ - icon: 🎓+ title: Guided Learning+ details: Personalized learning paths with interactive visualizations and adaptive explanations.- icon: 🔬title: Deep Research- details: Comprehensive topic exploration with systematic analysis, literature review, and novel insight discovery.+ details: Systematic topic exploration with web search, paper retrieval, and literature synthesis.- icon: 💡title: Idea Generation- details: Automated and interactive concept development with multi-source insights and novelty evaluation.+ details: Brainstorm research ideas with automated concept synthesis and novelty evaluation.+ - icon: ✏️+ title: Co-Writer+ details: AI-assisted writing with smart editing, auto-annotation, and TTS narration.----## Why DeepTutor?--DeepTutor transforms how students interact with educational materials through a unified multi-agent architecture. Unlike traditional tools, it provides:+<style>+:root {+ --vp-home-hero-name-color: transparent;+ --vp-home-hero-name-background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);+ --vp-home-hero-image-background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(240, 147, 251, 0.15) 100%);+ --vp-home-hero-image-filter: blur(68px);+}-- **Deep Understanding** - Not just answers, but guided learning journeys with visual explanations-- **Multi-Modal Support** - PDF, LaTeX, images, code execution, and more-- **Knowledge Graph** - Semantic connections powered by LightRAG for better comprehension-- **All-in-One Platform** - Problem solving, question generation, research, and idea generation+.dark {+ --vp-home-hero-image-background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 50%, rgba(240, 147, 251, 0.1) 100%);+}-## Quick Demo+/* DeepTutor 标题更大 */+.VPHero .name {+ font-size: 4rem !important;+ line-height: 1.1 !important;+}-```bash-# Clone and setup-git clone https://github.com/HKUDS/DeepTutor.git-cd DeepTutor+.VPHero .text {+ font-size: 2.2rem !important;+ font-weight: 600 !important;+ color: var(--vp-c-text-1);+}-# Install dependencies-bash scripts/install_all.sh+@media (max-width: 768px) {+ .VPHero .name {+ font-size: 2.8rem !important;+ }+ .VPHero .text {+ font-size: 1.6rem !important;+ }+}-# Start the application-python scripts/start_web.py-```+/* Hero 区域 Roadmap 按钮特殊样式 */+.VPButton.alt[href="/DeepTutor/roadmap"] {+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;+ color: white !important;+ border: none !important;+}-<style>-:root {- --vp-home-hero-name-color: transparent;- --vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);+.VPButton.alt[href="/DeepTutor/roadmap"]:hover {+ box-shadow: 0 4px 16px rgba(102, 126, 234, 0.5);+ transform: translateY(-2px);}</style>diff --git a/docs/roadmap.md b/docs/roadmap.mdindex c0e530452..9edad611f 100644--- a/docs/roadmap.md+++ b/docs/roadmap.md@@ -1,41 +1,177 @@# Roadmap-Our vision for DeepTutor's future development.+## ⚡ Current Focus-## ✅ Recently Completed (v0.4.0)+- 🔄 **More RAG Pipelines** — Expanding retrieval architectures and backends+- **Database Robustness & Visualization** — Stability improvements and visual insights+- 🔄 **Bug Fixing** — Addressing reported issues and edge cases-- [x] **RAG Module Decoupling** — Modular RAG architecture with provider-agnostic interface- - Currently supports RAG-Anything (MinerU + LightRAG)- - More backends coming soon-- [x] **Multi-Provider Support** — Expanded LLM and Embedding provider options- - LLM: OpenAI, Anthropic, Azure, Ollama, Groq, OpenRouter, DeepSeek, Gemini- - Embedding: OpenAI, Jina, Cohere, Ollama, LM Studio, HuggingFace-- [x] **Dark Mode** — System-wide dark/light theme support-- [x] **Environment Configuration** — Unified `.env` based configuration+## 📬 Received Feature Wishlist-## 🚀 Planned Features+Community-requested features we're considering:-- [ ] **Deepcoding from Idea Generation** — Transform research ideas into working prototypes-- [ ] **Personalized Memory** — Adapt tutoring style based on user learning history-- [ ] **Additional RAG Backends** — LlamaIndex, ChromaDB, Pinecone integration-- [ ] **More Embedding Adapters** — Voyage AI, Mixedbread, local transformers+- 👥 **Multi-user Collaborative Learning** — Real-time shared sessions+- 🎓 **Generalized Guided Learning** — Broader adaptive learning paths+- 📝 **Automatic Note Generation** — AI-powered summary and note creation-## 💭 Under Consideration+----- Multi-language support-- Mobile-friendly interface-- Collaborative learning features-- Voice interaction support-- Faster frontend framework+<div class="community-wrapper">-## 🤝 Community Requests+<div class="community-header">+ <h2>🤝 Shape the Future !</h2>+ <p>DeepTutor is built by the community, for the community.</p>+</div>-Have a feature idea? We'd love to hear it!+<div class="community-grid">-- Open a [Feature Request](https://github.com/HKUDS/DeepTutor/issues/new?template=feature_request.yml)-- Join the discussion on existing proposals-- Check our [GitHub Discussions](https://github.com/HKUDS/DeepTutor/discussions)+<div class="community-card">+ <div class="card-icon">💡</div>+ <div class="card-title">Ideas</div>+ <div class="card-desc">Share feedback & propose features</div>+ <div class="card-links">+ <div class="link-row">+ <a href="https://discord.gg/zpP9cssj" class="discord">Discord</a>+ <a href="https://github.com/HKUDS/DeepTutor/issues/78" class="wechat">WeChat</a>+ </div>+ <div class="link-row">+ <a href="https://github.com/HKUDS/DeepTutor/discussions" class="github">GitHub Discussions</a>+ </div>+ </div>+</div>----+<div class="community-card">+ <div class="card-icon">🔧</div>+ <div class="card-title">Code</div>+ <div class="card-desc">PRs welcome on <code>dev</code> branch</div>+ <div class="card-links">+ <a href="https://github.com/HKUDS/DeepTutor/blob/main/CONTRIBUTING.md" class="github">Contributing Guide →</a>+ </div>+</div>++</div>++</div>++<style>+.community-wrapper {+ margin-top: 24px;+ padding: 40px;+ background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);+ border: 1px solid rgba(102, 126, 234, 0.1);+ border-radius: 16px;+}++.community-header {+ text-align: center;+ margin-bottom: 32px;+}++.community-header h2 {+ margin: 0 0 8px;+ font-size: 1.6rem;+ border: none;+}++.community-header p {+ margin: 0;+ color: var(--vp-c-text-2);+ font-size: 1rem;+}++.community-grid {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 20px;+ max-width: 600px;+ margin: 0 auto;+}++@media (max-width: 640px) {+ .community-grid {+ grid-template-columns: 1fr;+ }+}++.community-card {+ background: var(--vp-c-bg);+ border: 1px solid var(--vp-c-divider);+ border-radius: 12px;+ padding: 24px;+ text-align: center;+ transition: all 0.25s ease;+}++.community-card:hover {+ border-color: rgba(102, 126, 234, 0.4);+ box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);+ transform: translateY(-2px);+}++.card-icon {+ font-size: 2rem;+ margin-bottom: 12px;+}++.card-title {+ font-size: 1.15rem;+ font-weight: 600;+ margin-bottom: 6px;+ color: var(--vp-c-text-1);+}++.card-desc {+ font-size: 0.9rem;+ color: var(--vp-c-text-2);+ margin-bottom: 16px;+}++.card-links {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 8px;+}++.link-row {+ display: flex;+ gap: 8px;+ justify-content: center;+}++.card-links a {+ font-size: 0.85rem;+ font-weight: 500;+ text-decoration: none;+ padding: 6px 14px;+ border-radius: 6px;+ transition: all 0.2s;+}++/* Discord - 蓝紫色 */+.card-links a.discord {+ color: #5865F2;+ background: rgba(88, 101, 242, 0.1);+}+.card-links a.discord:hover {+ background: rgba(88, 101, 242, 0.2);+}++/* WeChat - 绿色 */+.card-links a.wechat {+ color: #07C160;+ background: rgba(7, 193, 96, 0.1);+}+.card-links a.wechat:hover {+ background: rgba(7, 193, 96, 0.2);+}-⭐ **Star the repo** to follow our future updates!+/* GitHub - 深灰紫 */+.card-links a.github {+ color: #6e5494;+ background: rgba(110, 84, 148, 0.1);+}+.card-links a.github:hover {+ background: rgba(110, 84, 148, 0.2);+}+</style>diff --git a/docs/zh/features/overview.md b/docs/zh/features/overview.mdnew file mode 100644index 000000000..dc9d85265--- /dev/null+++ b/docs/zh/features/overview.md@@ -0,0 +1,57 @@+# 功能介绍++DeepTutor 提供六个专业模块,助力 AI 驱动的学习体验。++<div class="feature-nav">++## 核心模块++| 模块 | 描述 | 文档 |+|:-------|:------------|:--------------|+| 🧠 **智能解题** | 多 Agent 协作解题,双循环推理架构 | [详情 →](https://github.com/HKUDS/DeepTutor#-smart-solver) |+| 🎯 **题目生成** | 自定义测验生成,模拟真实考试风格 | [详情 →](https://github.com/HKUDS/DeepTutor#-question-generator) |+| 🎓 **引导学习** | 个性化学习路径,交互式可视化 | [详情 →](https://github.com/HKUDS/DeepTutor#-guided-learning) |+| 🔬 **深度研究** | 系统化主题探索,动态主题队列 | [详情 →](https://github.com/HKUDS/DeepTutor#-deep-research) |+| 💡 **想法生成** | 自动化研究想法生成,多阶段过滤 | [详情 →](https://github.com/HKUDS/DeepTutor#-automated-ideagen) |+| ✏️ **协作写作** | AI 辅助写作,TTS 语音朗读 | [详情 →](https://github.com/HKUDS/DeepTutor#-interactive-ideagen-co-writer) |++## 系统架构++<img src="/full-pipe.png" alt="DeepTutor 架构" style="width: 100%; border-radius: 8px; margin: 24px 0;">++### 系统层次++- **用户界面** — 双向查询响应,结构化输出+- **Agent 模块** — 各学习任务的专业 AI Agent+- **工具集成** — RAG、网络搜索、论文检索、代码执行+- **知识基础** — 知识图谱 + 向量存储 + 记忆系统++</div>++## 支持的服务商++DeepTutor 支持多种 LLM 和 Embedding 服务商:++::: details LLM 服务商+- OpenAI (GPT-4o, GPT-4)+- Anthropic (Claude 3.5)+- Azure OpenAI+- DeepSeek+- Groq+- OpenRouter+- Ollama(本地部署)+- Google Gemini+:::++::: details Embedding 服务商+- OpenAI+- Jina AI+- Cohere+- Ollama+- LM Studio+- HuggingFace+:::++---++📖 **完整文档**: [GitHub README](https://github.com/HKUDS/DeepTutor)diff --git a/docs/zh/guide/configuration.md b/docs/zh/guide/configuration.mdnew file mode 100644index 000000000..29d6cff68--- /dev/null+++ b/docs/zh/guide/configuration.md@@ -0,0 +1,81 @@+# 配置说明++## 配置文件++| 文件 | 用途 |+|:-----|:--------|+| `.env` | API 密钥、端口、服务商 |+| `config/agents.yaml` | LLM 参数(temperature、max_tokens)|+| `config/main.yaml` | 路径、工具、模块设置 |++## 环境变量++### 必需配置++```bash+# LLM+LLM_MODEL=gpt-4o+LLM_API_KEY=your_api_key+LLM_HOST=https://api.openai.com/v1++# Embedding+EMBEDDING_MODEL=text-embedding-3-large+EMBEDDING_API_KEY=your_api_key+EMBEDDING_HOST=https://api.openai.com/v1+EMBEDDING_DIMENSION=3072+```++### 可选配置++```bash+# 服务端口(默认:8001/3782)+BACKEND_PORT=8001+FRONTEND_PORT=3782++# 远程访问+NEXT_PUBLIC_API_BASE=http://your-server-ip:8001++# 网络搜索+SEARCH_PROVIDER=perplexity # 或:baidu+PERPLEXITY_API_KEY=your_key++# TTS 语音合成+TTS_MODEL=+TTS_URL=+TTS_API_KEY=+```++## Agent 参数++编辑 `config/agents.yaml`:++```yaml+solve:+ temperature: 0.3+ max_tokens: 8192++research:+ temperature: 0.5+ max_tokens: 12000++question:+ temperature: 0.7+ max_tokens: 4096+```++## 数据存储位置++```+data/+├── knowledge_bases/ # 你上传的文档+└── user/+ ├── solve/ # 解题输出+ ├── question/ # 生成的题目+ ├── research/ # 研究报告+ ├── guide/ # 学习会话+ └── logs/ # 系统日志+```++---++📖 **完整参考**: [config/README.md](https://github.com/HKUDS/DeepTutor/tree/main/config)diff --git a/docs/zh/guide/getting-started.md b/docs/zh/guide/getting-started.mdnew file mode 100644index 000000000..87c7f32ab--- /dev/null+++ b/docs/zh/guide/getting-started.md@@ -0,0 +1,78 @@+# 快速开始++5 分钟内让 DeepTutor 运行起来。++## 环境要求++- Python 3.10++- Node.js 18++- 一个 LLM API 密钥(OpenAI、Anthropic、DeepSeek 等)++## 安装++::: code-group++```bash [快速安装]+# 克隆并设置+git clone https://github.com/HKUDS/DeepTutor.git+cd DeepTutor++# 配置 API 密钥+cp .env.example .env+# 编辑 .env 填入你的 API 密钥++# 安装并启动+bash scripts/install_all.sh+python scripts/start_web.py+```++```bash [Docker]+docker run -d --name deeptutor \+ -p 8001:8001 -p 3782:3782 \+ -e LLM_MODEL=gpt-4o \+ -e LLM_API_KEY=your-key \+ -e LLM_HOST=https://api.openai.com/v1 \+ -e EMBEDDING_MODEL=text-embedding-3-large \+ -e EMBEDDING_API_KEY=your-key \+ -e EMBEDDING_HOST=https://api.openai.com/v1 \+ ghcr.io/hkuds/deeptutor:latest+```++:::++## `.env` 核心变量++```bash+# 必需+LLM_MODEL=gpt-4o+LLM_API_KEY=your_api_key+LLM_HOST=https://api.openai.com/v1++EMBEDDING_MODEL=text-embedding-3-large+EMBEDDING_API_KEY=your_api_key+EMBEDDING_HOST=https://api.openai.com/v1+```++> 📖 **完整配置选项**: 参见 [配置说明](/zh/guide/configuration) 或 [README](https://github.com/HKUDS/DeepTutor#step-1-pre-configuration)++## 访问地址++| 服务 | 地址 |+|:--------|:----|+| **Web 应用** | http://localhost:3782 |+| **API 文档** | http://localhost:8001/docs |++## 创建第一个知识库++1. 访问 http://localhost:3782/knowledge+2. 点击 **"新建知识库"**+3. 上传 PDF、TXT 或 Markdown 文件+4. 等待处理完成++完成!现在可以开始使用 **智能解题**、**题目生成** 或 **深度研究** 等模块。++## 下一步++- [配置说明 →](/zh/guide/configuration)+- [常见问题 →](/zh/guide/troubleshooting)+- [完整安装指南 →](https://github.com/HKUDS/DeepTutor#-getting-started)diff --git a/docs/zh/guide/troubleshooting.md b/docs/zh/guide/troubleshooting.mdnew file mode 100644index 000000000..4c76f76f0--- /dev/null+++ b/docs/zh/guide/troubleshooting.md@@ -0,0 +1,48 @@+# 常见问题++快速解决常见问题。++## 启动问题++| 问题 | 解决方案 |+|:--------|:---------|+| 后端启动失败 | 检查 Python ≥ 3.10,验证 `.env` 配置 |+| `npm: command not found` | 安装 Node.js: `conda install -c conda-forge nodejs` |+| 端口已被占用 | 终止进程:`lsof -i :8001` → `kill -9 <PID>` |++## 连接问题++| 问题 | 解决方案 |+|:--------|:---------|+| 前端无法连接后端 | 确认后端运行在 http://localhost:8001/docs |+| WebSocket 连接失败 | 检查防火墙,确认 `ws://localhost:8001/api/v1/...` 格式 |+| 远程访问失败 | 在 `.env` 中设置 `NEXT_PUBLIC_API_BASE=http://your-ip:8001` |++## Docker 问题++| 问题 | 解决方案 |+|:--------|:---------|+| 云端前端无法连接 | 设置 `NEXT_PUBLIC_API_BASE_EXTERNAL=https://your-server:8001` |+| 架构不匹配 | 使用 `uname -m` 检查:AMD64 用 `:latest`,ARM 用 `:latest-arm64` |++## 知识库问题++| 问题 | 解决方案 |+|:--------|:---------|+| 处理卡住 | 检查终端日志,验证 API 密钥 |+| `uvloop.Loop` 错误 | 运行:`./scripts/extract_numbered_items.sh <kb_name>` |++## 终止后台进程++```bash+# macOS/Linux+lsof -i :8001 && kill -9 <PID>++# Windows+netstat -ano | findstr :8001+taskkill /PID <PID> /F+```++---++📖 **完整 FAQ**: [GitHub README](https://github.com/HKUDS/DeepTutor#-faq)diff --git a/docs/zh/index.md b/docs/zh/index.mdnew file mode 100644index 000000000..1133c34f2--- /dev/null+++ b/docs/zh/index.md@@ -0,0 +1,87 @@+---+layout: home++hero:+ name: "DeepTutor"+ text: "你的 AI 学习伙伴"+ tagline: 将任何文档转化为互动学习体验+ image:+ src: /logo.png+ alt: DeepTutor+ actions:+ - theme: brand+ text: 快速开始 →+ link: /zh/guide/getting-started+ - theme: alt+ text: GitHub+ link: https://github.com/HKUDS/DeepTutor+ - theme: alt+ text: 🚀 路线图+ link: /zh/roadmap++features:+ - icon: 🧠+ title: 智能解题+ details: 双循环推理架构,提供逐步解答和文档精准引用。+ - icon: 🎯+ title: 题目生成+ details: 基于上传材料生成自定义测验或模拟真实考试。+ - icon: 🎓+ title: 引导学习+ details: 个性化学习路径,配合交互式可视化和自适应讲解。+ - icon: 🔬+ title: 深度研究+ details: 系统化主题探索,整合网络搜索、论文检索和文献综合。+ - icon: 💡+ title: 想法生成+ details: 自动化概念综合和新颖性评估,助力头脑风暴。+ - icon: ✏️+ title: 协作写作+ details: AI 辅助写作,智能编辑、自动标注和语音朗读。+---++<style>+:root {+ --vp-home-hero-name-color: transparent;+ --vp-home-hero-name-background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);+ --vp-home-hero-image-background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(240, 147, 251, 0.15) 100%);+ --vp-home-hero-image-filter: blur(68px);+}++.dark {+ --vp-home-hero-image-background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 50%, rgba(240, 147, 251, 0.1) 100%);+}++/* DeepTutor 标题更大 */+.VPHero .name {+ font-size: 4rem !important;+ line-height: 1.1 !important;+}++.VPHero .text {+ font-size: 2.2rem !important;+ font-weight: 600 !important;+ color: var(--vp-c-text-1);+}++@media (max-width: 768px) {+ .VPHero .name {+ font-size: 2.8rem !important;+ }+ .VPHero .text {+ font-size: 1.6rem !important;+ }+}++/* Hero 区域 Roadmap 按钮特殊样式 */+.VPButton.alt[href="/DeepTutor/zh/roadmap"] {+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;+ color: white !important;+ border: none !important;+}++.VPButton.alt[href="/DeepTutor/zh/roadmap"]:hover {+ box-shadow: 0 4px 16px rgba(102, 126, 234, 0.5);+ transform: translateY(-2px);+}+</style>diff --git a/docs/zh/roadmap.md b/docs/zh/roadmap.mdnew file mode 100644index 000000000..a5df883f3--- /dev/null+++ b/docs/zh/roadmap.md@@ -0,0 +1,177 @@+# 路线图++## ⚡ 当前重点++- 🔄 **更多 RAG 管道** — 扩展检索架构和后端+- **数据库稳定性与可视化** — 稳定性改进和可视化洞察+- 🔄 **Bug 修复** — 处理已报告的问题和边缘情况++## 📬 社区需求清单++来自社区的功能请求:++- 👥 **多用户协作学习** — 实时共享学习会话+- 🎓 **通用引导学习** — 更广泛的自适应学习路径+- 📝 **自动笔记生成** — AI 驱动的摘要和笔记创建++---++<div class="community-wrapper">++<div class="community-header">+ <h2>🤝 共创未来!</h2>+ <p>DeepTutor 由社区构建,为社区服务。</p>+</div>++<div class="community-grid">++<div class="community-card">+ <div class="card-icon">💡</div>+ <div class="card-title">想法</div>+ <div class="card-desc">分享反馈,提出功能建议</div>+ <div class="card-links">+ <div class="link-row">+ <a href="https://discord.gg/zpP9cssj" class="discord">Discord</a>+ <a href="https://github.com/HKUDS/DeepTutor/issues/78" class="wechat">微信群</a>+ </div>+ <div class="link-row">+ <a href="https://github.com/HKUDS/DeepTutor/discussions" class="github">GitHub Discussions</a>+ </div>+ </div>+</div>++<div class="community-card">+ <div class="card-icon">🔧</div>+ <div class="card-title">代码</div>+ <div class="card-desc">欢迎向 <code>dev</code> 分支提交 PR</div>+ <div class="card-links">+ <a href="https://github.com/HKUDS/DeepTutor/blob/main/CONTRIBUTING.md" class="github">贡献指南 →</a>+ </div>+</div>++</div>++</div>++<style>+.community-wrapper {+ margin-top: 24px;+ padding: 40px;+ background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);+ border: 1px solid rgba(102, 126, 234, 0.1);+ border-radius: 16px;+}++.community-header {+ text-align: center;+ margin-bottom: 32px;+}++.community-header h2 {+ margin: 0 0 8px;+ font-size: 1.6rem;+ border: none;+}++.community-header p {+ margin: 0;+ color: var(--vp-c-text-2);+ font-size: 1rem;+}++.community-grid {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 20px;+ max-width: 600px;+ margin: 0 auto;+}++@media (max-width: 640px) {+ .community-grid {+ grid-template-columns: 1fr;+ }+}++.community-card {+ background: var(--vp-c-bg);+ border: 1px solid var(--vp-c-divider);+ border-radius: 12px;+ padding: 24px;+ text-align: center;+ transition: all 0.25s ease;+}++.community-card:hover {+ border-color: rgba(102, 126, 234, 0.4);+ box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);+ transform: translateY(-2px);+}++.card-icon {+ font-size: 2rem;+ margin-bottom: 12px;+}++.card-title {+ font-size: 1.15rem;+ font-weight: 600;+ margin-bottom: 6px;+ color: var(--vp-c-text-1);+}++.card-desc {+ font-size: 0.9rem;+ color: var(--vp-c-text-2);+ margin-bottom: 16px;+}++.card-links {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 8px;+}++.link-row {+ display: flex;+ gap: 8px;+ justify-content: center;+}++.card-links a {+ font-size: 0.85rem;+ font-weight: 500;+ text-decoration: none;+ padding: 6px 14px;+ border-radius: 6px;+ transition: all 0.2s;+}++/* Discord - 蓝紫色 */+.card-links a.discord {+ color: #5865F2;+ background: rgba(88, 101, 242, 0.1);+}+.card-links a.discord:hover {+ background: rgba(88, 101, 242, 0.2);+}++/* WeChat - 绿色 */+.card-links a.wechat {+ color: #07C160;+ background: rgba(7, 193, 96, 0.1);+}+.card-links a.wechat:hover {+ background: rgba(7, 193, 96, 0.2);+}++/* GitHub - 深灰紫 */+.card-links a.github {+ color: #6e5494;+ background: rgba(110, 84, 148, 0.1);+}+.card-links a.github:hover {+ background: rgba(110, 84, 148, 0.2);+}+</style>