diff --git a/.claude/settings.json b/.claude/settings.json
new file mode 100644
index 0000000000..c62a26741d
--- /dev/null
+++ b/.claude/settings.json
@@ -0,0 +1,5 @@
+{
+ "enabledPlugins": {
+ "skill-creator@claude-plugins-official": true
+ }
+}
diff --git a/.claude/skills/doc-i18n/SKILL.md b/.claude/skills/doc-i18n/SKILL.md
new file mode 100644
index 0000000000..bc7841abb1
--- /dev/null
+++ b/.claude/skills/doc-i18n/SKILL.md
@@ -0,0 +1,114 @@
+---
+name: doc-i18n
+description: 将 FastGPT 文档从中文翻译为面向北美用户的英文。当用户提到翻译文档、i18n、国际化、translate docs、新增/修改了中文文档需要同步英文版时,使用此 skill。也适用于用户要求检查文档翻译缺失、批量翻译、或对比中英文文档差异的场景。
+---
+
+## 概述
+
+FastGPT 文档采用双文件 i18n 方案,中文为源语言,英文为目标语言。你的任务是将中文文档翻译为自然流畅的北美英文,而非逐字直译。
+
+## 文件结构
+
+文档位于 `document/content/docs/` 目录下:
+
+- 内容文件:`{name}.mdx`(中文) → `{name}.en.mdx`(英文)
+- 导航文件:`meta.json`(中文) → `meta.en.json`(英文)
+
+## 工作流程
+
+### 1. 确定翻译范围
+
+两种方式确定需要翻译的文件:
+
+**自动检测**(用户未指定具体文件时):
+- 运行 `git diff --name-only` 和 `git diff --cached --name-only` 检测 `document/` 下变更的中文文件
+- 筛选出 `.mdx`(排除 `.en.mdx`)和 `meta.json`(排除 `meta.en.json`)
+- 检查对应的英文文件是否存在或是否需要更新
+
+**手动指定**:用户直接给出文件路径或目录。
+
+### 2. 翻译内容文件(.mdx → .en.mdx)
+
+对每个中文 `.mdx` 文件,生成或更新对应的 `.en.mdx` 文件。
+
+**保持不变的部分**:
+- MDX import 语句(如 `import { Alert } from '@/components/docs/Alert'`)
+- 图片路径(如 ``)
+- 链接 URL(保持原始 URL 不变)
+- HTML/JSX 组件结构和属性(如 ``)
+- 表格的 markdown 结构
+- 代码块内容(除非是中文注释)
+- emoji 符号
+
+**需要翻译的部分**:
+- frontmatter 的 `title` 和 `description`
+- 所有正文文本内容
+- 组件内的文本内容(如 Alert 内的文字)
+- 表格中的文字内容
+- 代码块中的中文注释
+
+### 3. 翻译导航文件(meta.json → meta.en.json)
+
+对每个中文 `meta.json`,生成或更新对应的 `meta.en.json`。
+
+**需要翻译的字段**:`title`、`description`、分隔符字符串(如 `"---入门---"` → `"---Getting Started---"`)
+
+**保持不变的字段**:`pages` 数组中的文件名引用、`icon`、`root`、`order`
+
+### 4. 翻译完成后
+
+- 列出所有已翻译的文件
+- 如果发现中文文件有对应英文文件缺失的情况,提醒用户
+
+## 翻译原则
+
+这些原则的核心目标是让北美开发者读起来感觉像是原生英文文档,而不是翻译过来的。
+
+### 语言风格
+
+- 面向北美开发者,使用自然的美式英语技术写作风格
+- 不要逐字翻译,要传达原文的意思和意图
+- 技术文档倾向简洁直接,避免冗余修饰
+- 中文文档常用的排比、铺陈手法,翻译时应精简为英文读者习惯的表达
+
+**示例**:
+```
+中文:可轻松导入各式各样的文档及数据,能自动对其开展知识结构化处理工作。
+ ✗:You can easily import various documents and data, which will be automatically processed for knowledge structuring.
+ ✓:Import documents and data with automatic knowledge structuring.
+```
+
+### 中国特有平台和服务的本地化
+
+直接使用国际版名称,不保留中文原名:
+
+| 中文 | 英文 |
+|------|------|
+| 飞书 | Lark |
+| 企业微信 | WeCom |
+| 钉钉 | DingTalk |
+| 公众号 | WeChat Official Account |
+| 文心一言 | ERNIE Bot |
+| 中国大陆版 | China Mainland |
+| 国际版 | International |
+
+### 技术术语
+
+保持业界通用的英文术语,不要生造翻译:
+
+| 中文 | 英文 |
+|------|------|
+| 知识库 | Knowledge Base |
+| 工作流 | Workflow |
+| 大语言模型 | LLM / Large Language Model |
+| 向量存储 | Vector Store |
+| 可视化编排 | Visual Orchestration |
+| 低代码 | Low-code |
+| 节点 | Node |
+| 插件 | Plugin |
+
+### 语气
+
+- 保持专业但友好的语气,和原文档的风格一致
+- 不要过度正式,也不要过于随意
+- 面向开发者和技术用户,假设读者有基本的技术背景
diff --git a/.claude/skills/system-create_skill_file/SKILL.md b/.claude/skills/system-create_skill_file/SKILL.md
deleted file mode 100644
index e089adc08b..0000000000
--- a/.claude/skills/system-create_skill_file/SKILL.md
+++ /dev/null
@@ -1,475 +0,0 @@
----
-name: create-skill-file
-description: Guides Claude in creating well-structured SKILL.md files following best practices. Provides clear guidelines for naming, structure, and content organization to make skills easy to discover and execute.
----
-
-# Claude Agent Skill 编写规范
-
-> 如何创建高质量的 SKILL.md 文件
-
-## 目录
-
-- [快速开始](#快速开始)
-- [核心原则](#核心原则)
-- [文件结构规范](#文件结构规范)
-- [命名和描述规范](#命名和描述规范)
-- [内容编写指南](#内容编写指南)
-- [质量检查清单](#质量检查清单)
-
----
-
-## 快速开始
-
-### 3步创建 Skill
-
-**第1步: 创建目录**
-
-```bash
-mkdir -p .claude/skill/your-skill-name
-cd .claude/skill/your-skill-name
-```
-
-**第2步: 创建 SKILL.md**
-
-```markdown
----
-name: your-skill-name
-description: Brief description with trigger keywords and scenarios
----
-
-# Your Skill Title
-
-## When to Use This Skill
-
-- User asks to [specific scenario]
-- User mentions "[keyword]"
-
-## How It Works
-
-1. Step 1: [Action]
-2. Step 2: [Action]
-
-## Examples
-
-**Input**: User request
-**Output**: Expected result
-```
-
-**第3步: 测试**
-- 在对话中使用 description 中的关键词触发
-- 观察 Claude 是否正确执行
-- 根据效果调整
-
----
-
-## 核心原则
-
-### 1. 保持简洁
-
-只添加 Claude **不知道**的新知识:
-- ✅ 项目特定的工作流程
-- ✅ 特殊的命名规范或格式要求
-- ✅ 自定义工具和脚本的使用方法
-- ❌ 通用编程知识
-- ❌ 显而易见的步骤
-
-**示例对比**:
-
-```markdown
-# ❌ 过度详细
-1. 创建 Python 文件
-2. 导入必要的库
-3. 定义函数
-4. 编写主程序逻辑
-
-# ✅ 简洁有效
-使用 `scripts/api_client.py` 调用内部 API。
-请求头必须包含 `X-Internal-Token`(从环境变量 `INTERNAL_API_KEY` 获取)。
-```
-
-### 2. 设定合适的自由度
-
-| 自由度 | 适用场景 | 编写方式 |
-|--------|---------|---------|
-| **高** | 需要创造性、多种解决方案 | 提供指导原则,不限定具体步骤 |
-| **中** | 有推荐模式但允许变化 | 提供参数化示例和默认流程 |
-| **低** | 容易出错、需严格执行 | 提供详细的分步指令或脚本 |
-
-**判断标准**:
-- 任务是否有明确的"正确答案"? → 低自由度
-- 是否需要适应不同场景? → 高自由度
-- 错误的代价有多大? → 代价高则用低自由度
-
-### 3. 渐进式披露
-
-将复杂内容分层组织:
-
-```
-SKILL.md (主文档, 200-500行)
-├── reference.md (详细文档)
-├── examples.md (完整示例)
-└── scripts/ (可执行脚本)
-```
-
-**规则**:
-- SKILL.md 超过 500行 → 拆分子文件
-- 子文件超过 100行 → 添加目录
-- 引用深度 ≤ 1层
-
----
-
-## 文件结构规范
-
-### YAML Frontmatter
-
-```yaml
----
-name: skill-name-here
-description: Clear description of what this skill does and when to activate it
----
-```
-
-**字段规范**:
-
-| 字段 | 要求 | 说明 |
-|------|------|------|
-| `name` | 小写字母、数字、短横线,≤64字符 | 必须与目录名一致 |
-| `description` | 纯文本,≤1024字符 | 用于检索和激活 |
-
-**命名禁忌**:
-- ❌ XML 标签、保留字(`anthropic`, `claude`)
-- ❌ 模糊词汇(`helper`, `utility`, `manager`)
-- ❌ 空格或下划线(用短横线 `-`)
-
-**Description 技巧**:
-
-```yaml
-# ❌ 过于泛化
-description: Helps with code tasks
-
-# ✅ 具体且包含关键词
-description: Processes CSV files and generates Excel reports with charts. Use when user asks to convert data formats or create visual reports.
-
-# ✅ 说明触发场景
-description: Analyzes Python code for security vulnerabilities using bandit. Activates when user mentions "security audit" or "vulnerability scan".
-```
-
-### 目录组织
-
-**基础结构**(简单 Skill):
-```
-skill-name/
-└── SKILL.md
-```
-
-**标准结构**(推荐):
-```
-skill-name/
-├── SKILL.md
-├── templates/
-│ └── template.md
-└── scripts/
- └── script.py
-```
-
----
-
-## 命名和描述规范
-
-### Skill 命名
-
-**推荐格式**: 动名词形式 (verb-ing + noun)
-
-```
-✅ 好的命名:
-- processing-csv-files
-- generating-api-docs
-- managing-database-migrations
-
-❌ 不好的命名:
-- csv (过于简短)
-- data_processor (使用下划线)
-- helper (过于模糊)
-```
-
-### Description 编写
-
-**必须使用第三人称**:
-
-```yaml
-# ❌ 错误
-description: I help you process PDFs
-
-# ✅ 正确
-description: Processes PDF documents and extracts structured data
-```
-
-**4C 原则**:
-- **Clear** (清晰): 避免术语和模糊词汇
-- **Concise** (简洁): 1-2句话说明核心功能
-- **Contextual** (上下文): 说明适用场景
-- **Complete** (完整): 功能 + 触发条件
-
----
-
-## 内容编写指南
-
-### "When to Use" 章节
-
-明确说明触发场景:
-
-```markdown
-## When to Use This Skill
-
-- User asks to analyze Python code for type errors
-- User mentions "mypy" or "type checking"
-- User is working in a Python project with type hints
-- User needs to add type annotations
-```
-
-**模式**:
-- 直接请求: "User asks to X"
-- 关键词: "User mentions 'keyword'"
-- 上下文: "User is working with X"
-- 任务类型: "User needs to X"
-
-### 工作流设计
-
-**简单线性流程**:
-
-```markdown
-## How It Works
-
-1. Scan the project for all `.py` files
-2. Run `mypy --strict` on each file
-3. Parse error output and categorize by severity
-4. Generate summary report with fix suggestions
-```
-
-**条件分支流程**:
-
-```markdown
-## Workflow
-
-1. **Check project type**
- - If Django → Use `django-stubs` config
- - If Flask → Use `flask-stubs` config
- - Otherwise → Use default mypy config
-
-2. **Run type checking**
- - If errors found → Proceed to step 3
- - If no errors → Report success and exit
-```
-
-**Checklist 模式**(验证型任务):
-
-```markdown
-## Pre-deployment Checklist
-
-Execute in order. Stop if any step fails.
-
-- [ ] Run tests: `npm test` (must pass)
-- [ ] Build: `npm run build` (no errors)
-- [ ] Check deps: `npm audit` (no critical vulnerabilities)
-```
-
-### 示例和模板
-
-**输入-输出示例**:
-
-```markdown
-## Examples
-
-### Example 1: Basic Check
-
-**User Request**: "Check my code for type errors"
-
-**Action**:
-1. Scan for `.py` files
-2. Run `mypy` on all files
-
-**Output**:
-
- Found 3 type errors in 2 files:
- src/main.py:15: error: Missing return type
- src/utils.py:42: error: Incompatible types
-
-```
-
-### 脚本集成
-
-**何时使用脚本**:
-- 简单命令 → 直接在 SKILL.md 中说明
-- 复杂流程 → 提供独立脚本
-
-**脚本编写规范**:
-
-```python
-#!/usr/bin/env python3
-"""
-Brief description of what this script does.
-
-Usage:
- python script.py [--option value]
-"""
-
-import argparse
-
-DEFAULT_VALUE = 80 # Use constants, not magic numbers
-
-def main():
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument("directory", help="Directory to process")
- parser.add_argument("--threshold", type=int, default=DEFAULT_VALUE)
-
- args = parser.parse_args()
-
- # Validate inputs
- if not Path(args.directory).is_dir():
- print(f"Error: {args.directory} not found")
- return 1
-
- # Execute
- result = process(args.directory, args.threshold)
-
- # Report
- print(f"Processed {result['count']} files")
- return 0
-
-if __name__ == "__main__":
- exit(main())
-```
-
-**关键规范**:
-- ✅ Shebang 行和 docstring
-- ✅ 类型注解和常量
-- ✅ 参数验证和错误处理
-- ✅ 清晰的返回值(0=成功, 1=失败)
-
-### 最佳实践
-
-**Do**:
-- ✅ 提供可执行的命令和脚本
-- ✅ 包含输入-输出示例
-- ✅ 说明验证标准和成功条件
-- ✅ 包含 Do/Don't 清单
-
-**Don't**:
-- ❌ 包含 Claude 已知的通用知识
-- ❌ 使用抽象描述而非具体步骤
-- ❌ 遗漏错误处理指导
-- ❌ 示例使用伪代码而非真实代码
-
----
-
-## 质量检查清单
-
-### 核心质量
-
-- [ ] `name` 符合命名规范(小写、短横线、≤64字符)
-- [ ] `description` 包含触发关键词和场景(≤1024字符)
-- [ ] 名称与目录名一致
-- [ ] 只包含 Claude 不知道的信息
-- [ ] 没有冗余或重复内容
-
-### 功能完整性
-
-- [ ] 有"When to Use"章节,列出 3-5 个触发场景
-- [ ] 有清晰的执行流程或步骤
-- [ ] 至少 2-3 个完整示例
-- [ ] 包含输入和预期输出
-- [ ] 错误处理有指导
-
-### 结构规范
-
-- [ ] 章节组织清晰
-- [ ] 超过 200行有目录导航
-- [ ] 引用层级 ≤ 1层
-- [ ] 所有路径使用正斜杠 `/`
-- [ ] 术语使用一致
-
-### 脚本和模板
-
-- [ ] 脚本包含使用说明和参数文档
-- [ ] 脚本有错误处理
-- [ ] 避免魔法数字,使用配置
-- [ ] 模板格式清晰易用
-
-### 最终检查
-
-- [ ] 通读全文,确保流畅易读
-- [ ] 使用实际场景测试触发
-- [ ] 长度适中(200-500行,或已拆分)
-
----
-
-## 常见问题
-
-**Q: Skill 多长才合适?**
-- 最小: 50-100行
-- 理想: 200-500行
-- 最大: 500行(超过则拆分)
-
-**Q: 如何让 Skill 更容易激活?**
-- 在 `description` 中使用用户会说的关键词
-- 说明具体场景("when user asks to X")
-- 提及相关工具名称
-
-**Q: 多个 Skill 功能重叠怎么办?**
-- 使用更具体的 `description` 区分
-- 在"When to Use"中说明关系
-- 考虑合并为一个 Skill
-
-**Q: Skill 需要维护吗?**
-- 每季度审查一次,更新过时信息
-- 根据使用反馈迭代
-- 工具或 API 变更时及时更新
-
----
-
-## 快速参考
-
-### Frontmatter 模板
-
-```yaml
----
-name: skill-name
-description: Brief description with trigger keywords
----
-```
-
-### 基础结构模板
-
-```markdown
-# Skill Title
-
-## When to Use This Skill
-- Scenario 1
-- Scenario 2
-
-## How It Works
-1. Step 1
-2. Step 2
-
-## Examples
-### Example 1
-...
-
-## References
-- [Link](url)
-```
-
----
-
-## 相关资源
-
-- [Claude Agent Skills 官方文档](https://docs.claude.com/en/docs/agents-and-tools/agent-skills)
-- [Best Practices Checklist](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices)
-- [模板文件](templates/) - 开箱即用的模板
- - [基础 skill 的模板](templates/basic-skill-template.md)
- - [工作流 skill 的模板](templates/workflow-skill-template.md)
-- [示例库](examples/) - 完整的 Skill 示例
- - [优秀示例](examples/good-example.md)
- - [常见错误示例](examples/bad-example.md)
-
----
diff --git a/.claude/skills/system-create_skill_file/examples/bad-example.md b/.claude/skills/system-create_skill_file/examples/bad-example.md
deleted file mode 100644
index c0ae20b1bd..0000000000
--- a/.claude/skills/system-create_skill_file/examples/bad-example.md
+++ /dev/null
@@ -1,867 +0,0 @@
-# 不好的 Skill 示例与改进建议
-
-本文档展示常见的 Skill 编写错误,并提供改进建议。
-
----
-
-## 示例 1: 过于模糊的 Skill
-
-### ❌ 不好的版本
-
-```markdown
----
-name: helper
-description: Helps with code
----
-
-# Code Helper
-
-This skill helps you with coding tasks.
-
-## Usage
-
-Use this when you need help with code.
-
-## How It Works
-
-1. Analyzes your code
-2. Provides suggestions
-3. Helps improve it
-```
-
-### 问题分析
-
-| 问题 | 说明 | 影响 |
-|------|------|------|
-| **模糊的名称** | "helper" 太泛化,没有说明具体做什么 | Claude 不知道何时激活 |
-| **无关键词** | description 缺少具体触发词 | 用户很难激活这个 Skill |
-| **无具体场景** | 没说明适用什么类型的代码 | 适用范围不清 |
-| **抽象的步骤** | "Provides suggestions" 太模糊 | Claude 不知道具体做什么 |
-| **无示例** | 没有实际例子 | 用户和 Claude 都不清楚预期输出 |
-
-### ✅ 改进版本
-
-```markdown
----
-name: python-code-refactoring
-description: Refactors Python code to improve readability and maintainability using standard patterns. Activates when user asks to clean up code, improve structure, or mentions refactoring. Focuses on function extraction, variable naming, and removing code smells.
----
-
-# Python Code Refactoring Skill
-
-Improves Python code quality through systematic refactoring.
-
-## When to Use This Skill
-
-- User asks to "refactor this code", "clean up this function", or "improve readability"
-- User mentions "code smell", "technical debt", or "maintainability"
-- User is working with Python code that has:
- - Long functions (>50 lines)
- - Nested conditionals (>3 levels)
- - Repeated code patterns
- - Unclear variable names
-
-## How It Works
-
-### 1. Identify Refactoring Opportunities
-
-Scan code for common issues:
-- Functions longer than 50 lines
-- Repeated code blocks (DRY violations)
-- Magic numbers without constants
-- Unclear variable names (x, temp, data)
-- Deep nesting (>3 levels)
-
-### 2. Prioritize Changes
-
-Focus on high-impact refactorings:
-- **High**: Extract complex nested logic to functions
-- **Medium**: Rename unclear variables
-- **Low**: Minor style improvements
-
-### 3. Apply Refactorings
-
-**Extract Method**:
-```python
-# Before
-def process_order(order):
- # 50 lines of validation logic
- # 30 lines of payment processing
- # 20 lines of email notification
-
-# After
-def process_order(order):
- validate_order(order)
- process_payment(order)
- send_confirmation_email(order)
-```
-
-**Replace Magic Numbers**:
-```python
-# Before
-if user.age < 18:
- return False
-
-# After
-MINIMUM_AGE = 18
-if user.age < MINIMUM_AGE:
- return False
-```
-
-**Simplify Conditionals**:
-```python
-# Before
-if user.role == 'admin':
- return True
-elif user.role == 'moderator':
- return True
-elif user.role == 'editor':
- return True
-else:
- return False
-
-# After
-PRIVILEGED_ROLES = {'admin', 'moderator', 'editor'}
-return user.role in PRIVILEGED_ROLES
-```
-
-### 4. Verify Improvements
-
-After refactoring:
-- Run existing tests (all must pass)
-- Check code length reduced
-- Verify improved readability
-
-## Example
-
-**User Request**: "Refactor this function, it's too long"
-
-```python
-def process_user_registration(data):
- if not data.get('email'):
- return {'error': 'Email required'}
- if '@' not in data['email']:
- return {'error': 'Invalid email'}
- if not data.get('password'):
- return {'error': 'Password required'}
- if len(data['password']) < 8:
- return {'error': 'Password too short'}
- if not any(c.isupper() for c in data['password']):
- return {'error': 'Password needs uppercase'}
- existing = db.query(User).filter_by(email=data['email']).first()
- if existing:
- return {'error': 'Email already registered'}
- salt = bcrypt.gensalt()
- hashed = bcrypt.hashpw(data['password'].encode(), salt)
- user = User(email=data['email'], password_hash=hashed)
- db.add(user)
- db.commit()
- token = jwt.encode({'user_id': user.id}, SECRET_KEY)
- send_email(data['email'], 'Welcome!', 'Thanks for registering')
- return {'success': True, 'token': token}
-```
-
-**Refactored**:
-
-```python
-def process_user_registration(data):
- """Register new user with validation and email confirmation."""
- # Validation
- validation_error = validate_registration_data(data)
- if validation_error:
- return {'error': validation_error}
-
- # Check uniqueness
- if user_exists(data['email']):
- return {'error': 'Email already registered'}
-
- # Create user
- user = create_user(data['email'], data['password'])
-
- # Generate token
- token = generate_auth_token(user.id)
-
- # Send welcome email
- send_welcome_email(user.email)
-
- return {'success': True, 'token': token}
-
-
-def validate_registration_data(data):
- """Validate registration data, return error message or None."""
- if not data.get('email'):
- return 'Email required'
- if '@' not in data['email']:
- return 'Invalid email'
- if not data.get('password'):
- return 'Password required'
- return validate_password_strength(data['password'])
-
-
-def validate_password_strength(password):
- """Check password meets security requirements."""
- MIN_PASSWORD_LENGTH = 8
- if len(password) < MIN_PASSWORD_LENGTH:
- return f'Password must be at least {MIN_PASSWORD_LENGTH} characters'
- if not any(c.isupper() for c in password):
- return 'Password must contain uppercase letter'
- return None
-
-
-def user_exists(email):
- """Check if user with given email already exists."""
- return db.query(User).filter_by(email=email).first() is not None
-
-
-def create_user(email, password):
- """Create and save new user with hashed password."""
- salt = bcrypt.gensalt()
- hashed = bcrypt.hashpw(password.encode(), salt)
- user = User(email=email, password_hash=hashed)
- db.add(user)
- db.commit()
- return user
-
-
-def generate_auth_token(user_id):
- """Generate JWT authentication token."""
- return jwt.encode({'user_id': user_id}, SECRET_KEY)
-
-
-def send_welcome_email(email):
- """Send welcome email to new user."""
- send_email(email, 'Welcome!', 'Thanks for registering')
-```
-
-**Improvements**:
-- ✅ Main function reduced from 20 lines to 15 lines
-- ✅ Each function has single responsibility
-- ✅ Magic number (8) extracted to constant
-- ✅ All functions documented with docstrings
-- ✅ Easier to test individual functions
-- ✅ Easier to modify validation rules
-
-## Best Practices
-
-- ✅ Extract functions with clear names
-- ✅ Use constants instead of magic numbers
-- ✅ Keep functions under 30 lines
-- ✅ Maximum nesting depth of 2-3 levels
-- ✅ Write docstrings for extracted functions
-```
-
-### 改进要点
-
-1. ✅ 具体的名称: `python-code-refactoring` 而非 `helper`
-2. ✅ 详细的 description: 包含触发词和适用场景
-3. ✅ 明确的触发条件: 列出具体的使用场景
-4. ✅ 可执行的步骤: 每个步骤都有具体操作
-5. ✅ 实际代码示例: 展示完整的重构过程
-6. ✅ 具体的改进指标: 列出可验证的改进效果
-
----
-
-## 示例 2: 过度冗长的 Skill
-
-### ❌ 不好的版本
-
-```markdown
----
-name: python-basics
-description: Teaches Python programming basics
----
-
-# Python Basics
-
-This skill helps you learn Python programming.
-
-## Variables
-
-In Python, you can create variables like this:
-
-```python
-x = 5
-y = "hello"
-z = 3.14
-```
-
-Python supports different data types:
-- Integers (int): whole numbers like 1, 2, 3
-- Floats (float): decimal numbers like 3.14, 2.5
-- Strings (str): text like "hello", 'world'
-- Booleans (bool): True or False
-
-## Conditional Statements
-
-You can use if statements to make decisions:
-
-```python
-if x > 0:
- print("Positive")
-elif x < 0:
- print("Negative")
-else:
- print("Zero")
-```
-
-The if statement checks a condition. If True, it runs the indented code.
-The elif means "else if" and provides an alternative condition.
-The else runs if none of the above conditions are True.
-
-## Loops
-
-Python has two main types of loops:
-
-### For Loops
-
-For loops iterate over a sequence:
-
-```python
-for i in range(5):
- print(i)
-```
-
-This prints numbers 0 through 4. The range() function generates numbers.
-
-### While Loops
-
-While loops continue while a condition is True:
-
-```python
-i = 0
-while i < 5:
- print(i)
- i += 1
-```
-
-This does the same thing as the for loop above.
-
-## Functions
-
-Functions are reusable blocks of code:
-
-```python
-def greet(name):
- return f"Hello, {name}!"
-```
-
-The def keyword defines a function. The function name is greet.
-It takes one parameter called name. The return statement sends back a value.
-
-## Lists
-
-Lists store multiple items:
-
-```python
-fruits = ["apple", "banana", "orange"]
-```
-
-You can access items by index:
-
-```python
-first_fruit = fruits[0] # "apple"
-```
-
-... [continues for 50 more sections about Python basics]
-```
-
-### 问题分析
-
-| 问题 | 说明 | 影响 |
-|------|------|------|
-| **包含通用知识** | Python 基础知识 Claude 已经知道 | 浪费 token,增加检索成本 |
-| **教程式内容** | 像教程而非工作指南 | Claude 不需要学习,需要的是工作指导 |
-| **过度详细** | 解释显而易见的概念 | 信息过载,难以找到关键信息 |
-| **缺少项目特定信息** | 没有项目相关的规范或约定 | 无法提供项目特定价值 |
-
-### ✅ 改进版本
-
-```markdown
----
-name: project-python-conventions
-description: Enforces Python coding conventions specific to this project. Activates when user writes Python code or asks about code style. Covers naming, imports, error handling, and project-specific patterns.
----
-
-# Project Python Conventions
-
-Project-specific Python coding standards and patterns.
-
-## When to Use This Skill
-
-- User is writing or reviewing Python code
-- User asks about code style or conventions
-- User needs guidance on project patterns
-
-## Import Organization
-
-Follow this order:
-
-```python
-# 1. Standard library
-import os
-import sys
-from typing import Optional, List
-
-# 2. Third-party packages
-import numpy as np
-from fastapi import FastAPI
-
-# 3. Local application imports
-from core.models import User
-from utils.helpers import format_date
-```
-
-## Naming Conventions
-
-### Project-Specific Rules
-
-| Type | Pattern | Example |
-|------|---------|---------|
-| API endpoints | `/api/v1/{resource}` | `/api/v1/users` |
-| Database tables | `{resource}_table` | `users_table` |
-| Environment variables | `APP_{NAME}` | `APP_DATABASE_URL` |
-| Config files | `{env}.config.py` | `prod.config.py` |
-
-### Forbidden Patterns
-
-```python
-# ❌ Don't use single-letter variables (except i, j, k in loops)
-d = get_data()
-
-# ✅ Do use descriptive names
-user_data = get_data()
-
-# ❌ Don't use abbreviations
-usr_mgr = UserManager()
-
-# ✅ Do use full words
-user_manager = UserManager()
-```
-
-## Error Handling Pattern
-
-Use project's custom exceptions:
-
-```python
-from core.exceptions import UserNotFoundError, ValidationError
-
-def get_user(user_id: int) -> User:
- """
- Retrieve user by ID.
-
- Raises:
- UserNotFoundError: If user doesn't exist
- ValidationError: If user_id is invalid
- """
- if not isinstance(user_id, int) or user_id <= 0:
- raise ValidationError(f"Invalid user_id: {user_id}")
-
- user = db.query(User).get(user_id)
- if user is None:
- raise UserNotFoundError(f"User {user_id} not found")
-
- return user
-```
-
-**Never** use bare `except:` - always catch specific exceptions.
-
-## Database Queries
-
-Always use the project's query helper:
-
-```python
-# ❌ Don't use raw SQLAlchemy queries
-users = db.query(User).filter(User.age > 18).all()
-
-# ✅ Do use query helper
-from core.database import QueryBuilder
-
-users = QueryBuilder(User).where('age', '>', 18).get()
-```
-
-## API Response Format
-
-All API endpoints must return this format:
-
-```python
-{
- "success": True,
- "data": {
- # ... response data
- },
- "error": None,
- "meta": {
- "timestamp": "2025-01-31T12:00:00Z",
- "version": "1.0"
- }
-}
-```
-
-Use the response helper:
-
-```python
-from core.responses import success_response, error_response
-
-@app.get("/users/{id}")
-async def get_user(id: int):
- try:
- user = get_user_data(id)
- return success_response(user)
- except UserNotFoundError as e:
- return error_response(str(e), status_code=404)
-```
-
-## Testing Patterns
-
-### Test File Location
-
-```
-project/
-├── src/
-│ └── services/
-│ └── user_service.py
-└── tests/
- └── services/
- └── test_user_service.py
-```
-
-### Test Naming
-
-```python
-# Format: test_{function_name}_{scenario}_{expected_result}
-
-def test_get_user_valid_id_returns_user():
- """Test getting user with valid ID returns User object."""
- pass
-
-def test_get_user_invalid_id_raises_validation_error():
- """Test getting user with invalid ID raises ValidationError."""
- pass
-
-def test_get_user_nonexistent_id_raises_not_found_error():
- """Test getting non-existent user raises UserNotFoundError."""
- pass
-```
-
-## References
-
-- [Full Style Guide](docs/STYLE_GUIDE.md)
-- [API Standards](docs/API_STANDARDS.md)
-- [Database Conventions](docs/DATABASE.md)
-```
-
-### 改进要点
-
-1. ✅ 只包含项目特定信息: 不教 Python 基础
-2. ✅ 简洁明了: 200 行 vs 原来的 500+ 行
-3. ✅ 实用的规则: 直接可应用的约定
-4. ✅ 清晰的示例: Do/Don't 对比
-5. ✅ 引用详细文档: 用链接而非全部内容
-
----
-
-## 示例 3: 缺少上下文的 Skill
-
-### ❌ 不好的版本
-
-```markdown
----
-name: deployment
-description: Deploys code
----
-
-# Deployment
-
-## Steps
-
-1. Build the code
-2. Run tests
-3. Deploy to server
-4. Verify deployment
-```
-
-### 问题分析
-
-| 问题 | 说明 | 影响 |
-|------|------|------|
-| **无具体命令** | 没说明如何 build, test, deploy | Claude 无法执行 |
-| **无环境区分** | 开发、测试、生产部署可能不同 | 可能部署到错误环境 |
-| **无错误处理** | 没说明出错时怎么办 | 失败时不知如何恢复 |
-| **无验证标准** | "Verify" 太模糊 | 不知道检查什么 |
-
-### ✅ 改进版本
-
-```markdown
----
-name: deploy-to-production
-description: Deploys application to production environment on AWS. Activates when user asks to deploy to prod or mentions production deployment. Includes pre-flight checks, blue-green deployment, and rollback procedures.
----
-
-# Production Deployment
-
-Safely deploy application to production with zero downtime.
-
-## When to Use This Skill
-
-- User asks to "deploy to production" or "push to prod"
-- User mentions "production deployment", "go live"
-- User needs to rollback a deployment
-
-## Prerequisites
-
-Before deployment, verify:
-
-```bash
-# 1. On main branch
-git branch --show-current # Must be "main"
-
-# 2. All tests pass
-npm test # Exit code must be 0
-
-# 3. Build succeeds
-npm run build # Must complete without errors
-
-# 4. No uncommitted changes
-git status # Must show "nothing to commit"
-
-# 5. Latest code pulled
-git pull origin main # Must be up to date
-```
-
-If any prerequisite fails, **stop** and fix the issue.
-
-## Deployment Process
-
-### Step 1: Pre-flight Checks
-
-```bash
-# Run deployment readiness script
-./scripts/preflight-check.sh
-
-# Expected output:
-# ✓ Tests passed
-# ✓ Build succeeded
-# ✓ Environment variables configured
-# ✓ Database migrations ready
-# ✓ Ready to deploy
-```
-
-### Step 2: Database Migrations (if needed)
-
-```bash
-# Connect to production database
-aws rds describe-db-instances --db-instance-identifier prod-db
-
-# Backup before migration
-./scripts/backup-database.sh prod
-
-# Run migrations
-NODE_ENV=production npm run migrate
-
-# Verify migration succeeded
-npm run migrate:status
-```
-
-### Step 3: Blue-Green Deployment
-
-```bash
-# Deploy to green environment (inactive)
-aws elasticbeanstalk create-environment \
- --application-name myapp \
- --environment-name myapp-prod-green \
- --solution-stack-name "64bit Amazon Linux 2 v5.x.x running Node.js 18"
-
-# Wait for green environment to be healthy
-aws elasticbeanstalk wait environment-updated \
- --environment-name myapp-prod-green
-
-# Check green environment health
-curl https://myapp-prod-green.aws.com/health
-# Expected: {"status": "healthy"}
-```
-
-### Step 4: Smoke Tests
-
-```bash
-# Run smoke tests against green environment
-BASE_URL=https://myapp-prod-green.aws.com npm run test:smoke
-
-# Tests must include:
-# - Health check endpoint
-# - Authentication flow
-# - Critical API endpoints
-# - Database connectivity
-```
-
-### Step 5: Switch Traffic
-
-```bash
-# Swap URLs (blue becomes green, green becomes blue)
-aws elasticbeanstalk swap-environment-cnames \
- --source-environment-name myapp-prod-blue \
- --destination-environment-name myapp-prod-green
-
-# Wait 5 minutes for DNS propagation
-echo "Waiting for DNS propagation..."
-sleep 300
-
-# Verify production URL serves new version
-curl https://myapp.com/version
-# Expected: {"version": "1.2.3"} (new version)
-```
-
-### Step 6: Monitor
-
-```bash
-# Monitor error rates for 15 minutes
-aws cloudwatch get-metric-statistics \
- --namespace AWS/ELB \
- --metric-name HTTPCode_Backend_5XX \
- --start-time $(date -u -d '15 minutes ago' +%Y-%m-%dT%H:%M:%S) \
- --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
- --period 300 \
- --statistics Sum
-
-# Error rate must be < 1%
-```
-
-If error rate exceeds 1%:
-- **Rollback immediately** (see Rollback section)
-- Investigate issue
-- Fix and redeploy
-
-### Step 7: Cleanup
-
-```bash
-# After 24 hours, if no issues:
-# Terminate old blue environment
-aws elasticbeanstalk terminate-environment \
- --environment-name myapp-prod-blue
-```
-
-## Rollback Procedure
-
-If deployment fails:
-
-```bash
-# 1. Swap back to previous version
-aws elasticbeanstalk swap-environment-cnames \
- --source-environment-name myapp-prod-green \
- --destination-environment-name myapp-prod-blue
-
-# 2. Verify old version is serving
-curl https://myapp.com/version
-# Expected: {"version": "1.2.2"} (old version)
-
-# 3. Rollback database migrations (if ran)
-NODE_ENV=production npm run migrate:rollback
-
-# 4. Notify team
-./scripts/notify-rollback.sh "Deployment rolled back due to [reason]"
-```
-
-## Example Deployment
-
-**User Request**: "Deploy v1.2.3 to production"
-
-**Execution Log**:
-
-```
-[14:00:00] Starting deployment of v1.2.3 to production
-[14:00:05] ✓ Pre-flight checks passed
-[14:00:10] ✓ Database backup completed
-[14:00:30] ✓ Database migrations applied (3 migrations)
-[14:01:00] → Creating green environment
-[14:05:00] ✓ Green environment healthy
-[14:05:30] ✓ Smoke tests passed (12/12)
-[14:06:00] → Switching traffic to green environment
-[14:11:00] ✓ DNS propagated
-[14:11:05] ✓ Production serving v1.2.3
-[14:11:10] → Monitoring for 15 minutes
-[14:26:10] ✓ Error rate: 0.05% (within threshold)
-[14:26:15] ✓ Deployment successful
-[14:26:20] → Old environment will be terminated in 24h
-
-Deployment completed successfully in 26 minutes
-```
-
-## References
-
-- [AWS Deployment Guide](docs/AWS_DEPLOYMENT.md)
-- [Runbook](docs/RUNBOOK.md)
-- [On-Call Procedures](docs/ONCALL.md)
-```
-
-### 改进要点
-
-1. ✅ 具体命令: 每个步骤都有可执行的命令
-2. ✅ 环境明确: 专注于生产环境部署
-3. ✅ 验证标准: 说明检查什么和预期结果
-4. ✅ 错误处理: 包含完整的回滚流程
-5. ✅ 实际输出: 展示命令的预期输出
-6. ✅ 监控指标: 定义具体的成功标准
-
----
-
-## 常见错误总结
-
-### 1. 命名和描述问题
-
-| 错误 | 示例 | 改进 |
-|------|------|------|
-| 过于泛化 | `name: helper` | `name: python-type-hints` |
-| 缺少关键词 | `description: Helps with code` | `description: Adds type hints to Python using mypy` |
-| 使用第一人称 | `description: I help you...` | `description: Adds type hints...` |
-
-### 2. 内容问题
-
-| 错误 | 说明 | 改进 |
-|------|------|------|
-| 包含通用知识 | 教 Python 基础语法 | 只包含项目特定规范 |
-| 过于抽象 | "分析代码并提供建议" | "检查函数长度、变量命名、重复代码" |
-| 缺少示例 | 只有文字描述 | 包含输入-输出示例 |
-
-### 3. 结构问题
-
-| 错误 | 说明 | 改进 |
-|------|------|------|
-| 无层次结构 | 所有内容混在一起 | 使用标题、列表、代码块组织 |
-| 缺少"When to Use" | 不知道何时激活 | 列出 3-5 个触发场景 |
-| 无验证步骤 | 不知道如何确认成功 | 说明检查项和预期结果 |
-
-### 4. 自由度问题
-
-| 错误 | 说明 | 改进 |
-|------|------|------|
-| 创意任务低自由度 | 为架构设计提供分步指令 | 提供指导原则和考虑因素 |
-| 危险任务高自由度 | 生产部署没有具体步骤 | 提供详细的检查清单 |
-| 不匹配任务类型 | 代码生成用教程式内容 | 提供模板和实际示例 |
-
----
-
-## 快速检查清单
-
-在发布 Skill 之前,问自己:
-
-### 基础检查
-
-- [ ] Name 是否具体且描述性强?
-- [ ] Description 包含触发关键词和场景?
-- [ ] 有明确的"When to Use"章节?
-- [ ] 内容只包含 Claude 不知道的信息?
-
-### 内容检查
-
-- [ ] 是否有实际的代码示例?
-- [ ] 步骤是否具体可执行?
-- [ ] 是否说明了如何验证成功?
-- [ ] 是否包含错误处理指导?
-
-### 结构检查
-
-- [ ] 内容组织清晰(使用标题、列表)?
-- [ ] 自由度设定合适(匹配任务类型)?
-- [ ] 长度合适(200-500行,或拆分子文件)?
-- [ ] 包含 Do/Don't 最佳实践?
-
-如果有任何一项答"否",参考本文档的改进建议进行修改。
\ No newline at end of file
diff --git a/.claude/skills/system-create_skill_file/examples/good-example.md b/.claude/skills/system-create_skill_file/examples/good-example.md
deleted file mode 100644
index e3016a1f24..0000000000
--- a/.claude/skills/system-create_skill_file/examples/good-example.md
+++ /dev/null
@@ -1,908 +0,0 @@
-# 好的 Skill 示例
-
-本文档展示几个编写良好的 SKILL.md 示例,说明最佳实践的实际应用。
-
----
-
-## 示例 1: 数据库迁移 Skill (高质量基础 Skill)
-
-```markdown
----
-name: database-migration
-description: Manages database schema migrations using Alembic for SQLAlchemy projects. Activates when user asks to create migrations, upgrade/downgrade database, or mentions Alembic. Handles both development and production scenarios with safety checks.
----
-
-# Database Migration Skill
-
-Automates database schema migration management using Alembic.
-
-## When to Use This Skill
-
-- User asks to "create migration", "update database schema", or "rollback migration"
-- User mentions "Alembic", "database migration", or "schema change"
-- User is working in a Python project with SQLAlchemy models
-- User needs to apply or revert database changes
-
-## Quick Start
-
-Create a new migration:
-```bash
-alembic revision --autogenerate -m "Description of changes"
-```
-
-Apply migrations:
-```bash
-alembic upgrade head
-```
-
-## How It Works
-
-### Creating Migrations
-
-1. **Detect model changes**
- - Scan SQLAlchemy models in `models/` directory
- - Compare with current database schema
- - Identify additions, modifications, deletions
-
-2. **Generate migration script**
- - Run `alembic revision --autogenerate`
- - Review generated script for accuracy
- - Edit if necessary (Alembic can't auto-detect everything)
-
-3. **Verify migration**
- - Check upgrade() function is correct
- - Ensure downgrade() function reverses changes
- - Test on development database first
-
-### Applying Migrations
-
-1. **Safety checks**
- - Backup database (production only)
- - Verify no pending migrations
- - Check database connectivity
-
-2. **Execute migration**
- - Run `alembic upgrade head`
- - Monitor for errors
- - Verify schema matches expected state
-
-3. **Post-migration validation**
- - Run application tests
- - Check data integrity
- - Confirm application starts successfully
-
-## Examples
-
-### Example 1: Add New Column
-
-**User Request**: "Add an email column to the users table"
-
-**Step 1**: Update the model
-```python
-# models/user.py
-class User(Base):
- __tablename__ = 'users'
- id = Column(Integer, primary_key=True)
- username = Column(String(50), nullable=False)
- email = Column(String(120), nullable=True) # ← New field
-```
-
-**Step 2**: Generate migration
-```bash
-alembic revision --autogenerate -m "Add email column to users table"
-```
-
-**Generated migration** (alembic/versions/abc123_add_email.py):
-```python
-def upgrade():
- op.add_column('users', sa.Column('email', sa.String(120), nullable=True))
-
-def downgrade():
- op.drop_column('users', 'email')
-```
-
-**Step 3**: Review and apply
-```bash
-# Review the migration file
-cat alembic/versions/abc123_add_email.py
-
-# Apply migration
-alembic upgrade head
-```
-
-**Output**:
-```
-INFO [alembic.runtime.migration] Running upgrade xyz789 -> abc123, Add email column to users table
-```
-
-### Example 2: Complex Migration with Data Changes
-
-**User Request**: "Split the 'name' column into 'first_name' and 'last_name'"
-
-**Step 1**: Create empty migration (can't auto-generate data changes)
-```bash
-alembic revision -m "Split name into first_name and last_name"
-```
-
-**Step 2**: Write custom migration
-```python
-def upgrade():
- # Add new columns
- op.add_column('users', sa.Column('first_name', sa.String(50)))
- op.add_column('users', sa.Column('last_name', sa.String(50)))
-
- # Migrate existing data
- connection = op.get_bind()
- users = connection.execute("SELECT id, name FROM users")
- for user_id, name in users:
- parts = name.split(' ', 1)
- first = parts[0]
- last = parts[1] if len(parts) > 1 else ''
- connection.execute(
- "UPDATE users SET first_name = %s, last_name = %s WHERE id = %s",
- (first, last, user_id)
- )
-
- # Make new columns non-nullable and drop old column
- op.alter_column('users', 'first_name', nullable=False)
- op.alter_column('users', 'last_name', nullable=False)
- op.drop_column('users', 'name')
-
-def downgrade():
- # Add back name column
- op.add_column('users', sa.Column('name', sa.String(100)))
-
- # Restore data
- connection = op.get_bind()
- users = connection.execute("SELECT id, first_name, last_name FROM users")
- for user_id, first, last in users:
- full_name = f"{first} {last}".strip()
- connection.execute(
- "UPDATE users SET name = %s WHERE id = %s",
- (full_name, user_id)
- )
-
- op.alter_column('users', 'name', nullable=False)
- op.drop_column('users', 'first_name')
- op.drop_column('users', 'last_name')
-```
-
-**Step 3**: Test thoroughly
-```bash
-# Apply migration
-alembic upgrade head
-
-# Verify data
-python -c "from models import User; print(User.query.first().first_name)"
-
-# Test rollback
-alembic downgrade -1
-python -c "from models import User; print(User.query.first().name)"
-
-# Reapply
-alembic upgrade head
-```
-
-## Best Practices
-
-### Do
-
-- ✅ Always review auto-generated migrations before applying
-- ✅ Test migrations on development database first
-- ✅ Write reversible downgrade() functions
-- ✅ Backup production databases before major migrations
-- ✅ Use meaningful migration messages
-
-### Don't
-
-- ❌ Trust auto-generated migrations blindly
-- ❌ Skip downgrade() implementation
-- ❌ Apply untested migrations to production
-- ❌ Modify existing migration files after they're committed
-- ❌ Use raw SQL without bind parameters
-
-## Troubleshooting
-
-### "Target database is not up to date"
-
-**Problem**: Someone else applied migrations you don't have locally
-
-**Solution**:
-```bash
-git pull # Get latest migrations
-alembic upgrade head # Apply them locally
-```
-
-### "Can't locate revision identified by 'xyz'"
-
-**Problem**: Migration file deleted or branch conflict
-
-**Solution**:
-1. Check if migration file exists in `alembic/versions/`
-2. If missing, restore from git history
-3. If branch conflict, merge migration branches:
- ```bash
- alembic merge -m "Merge migration branches" head1 head2
- ```
-
-### Migration fails mid-execution
-
-**Problem**: Error occurred during migration
-
-**Solution**:
-1. Check error message for specifics
-2. Manually fix database to consistent state if needed
-3. Update migration script to fix the issue
-4. Mark migration as completed or retry:
- ```bash
- # Mark as done without running
- alembic stamp head
-
- # Or fix and retry
- alembic upgrade head
- ```
-
-## Configuration
-
-### Project Structure
-```
-project/
-├── alembic/
-│ ├── versions/ # Migration scripts
-│ ├── env.py # Alembic environment
-│ └── script.py.mako # Migration template
-├── alembic.ini # Alembic configuration
-└── models/ # SQLAlchemy models
- ├── __init__.py
- ├── user.py
- └── post.py
-```
-
-### alembic.ini Configuration
-```ini
-[alembic]
-script_location = alembic
-sqlalchemy.url = driver://user:pass@localhost/dbname
-
-[loggers]
-keys = root,sqlalchemy,alembic
-
-[logger_alembic]
-level = INFO
-handlers = console
-qualname = alembic
-```
-
-## References
-
-- [Alembic Documentation](https://alembic.sqlalchemy.org/)
-- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)
-- [Project Migration Guidelines](docs/database-migrations.md)
-```
-
-### 为什么这是好的 Skill?
-
-1. ✅ **清晰的 description**: 包含触发关键词 ("Alembic", "create migrations") 和场景 ("SQLAlchemy projects")
-2. ✅ **具体的触发条件**: "When to Use" 列出 4 个明确场景
-3. ✅ **分步工作流**: 每个操作都有清晰的 1-2-3 步骤
-4. ✅ **实际示例**: 包含简单和复杂两个示例,有完整代码
-5. ✅ **最佳实践**: Do/Don't 清单易于遵循
-6. ✅ **故障排除**: 覆盖 3 个常见问题及解决方案
-7. ✅ **项目特定信息**: 包含配置和目录结构
-
----
-
-## 示例 2: API 文档生成 Skill (优秀的工作流 Skill)
-
-```markdown
----
-name: api-documentation-generation
-description: Generates OpenAPI/Swagger documentation from FastAPI or Flask applications. Activates when user asks to create API docs, generate OpenAPI spec, or needs to document REST endpoints. Supports automatic extraction and custom annotations.
----
-
-# API Documentation Generation Skill
-
-Automates creation of comprehensive API documentation from Python web applications.
-
-## When to Use This Skill
-
-- User asks to "generate API docs" or "create OpenAPI spec"
-- User mentions "Swagger", "OpenAPI", "API documentation"
-- User has a FastAPI or Flask application
-- User needs to document REST API endpoints
-
-## Workflow
-
-### Phase 1: Discovery
-
-1. **Identify framework**
- - Check for FastAPI: `from fastapi import FastAPI` in codebase
- - Check for Flask: `from flask import Flask` in codebase
- - Check for Flask-RESTful: `from flask_restful import Resource`
-
-2. **Locate API definitions**
- - Scan for route decorators: `@app.get()`, `@app.post()`, `@app.route()`
- - Find API routers and blueprints
- - Identify request/response models
-
-3. **Extract metadata**
- - Endpoint paths and HTTP methods
- - Request parameters (path, query, body)
- - Response schemas and status codes
- - Authentication requirements
-
-### Phase 2: Enhancement
-
-1. **Review docstrings**
- - Check if endpoints have docstrings
- - Verify docstrings follow format (summary, description, params, returns)
- - Flag missing documentation
-
-2. **Add missing docs** (if user approves)
- - Generate docstrings based on type hints
- - Infer descriptions from parameter names
- - Add example requests/responses
-
-3. **Validate schemas**
- - Ensure Pydantic models are well-documented
- - Check for missing field descriptions
- - Verify example values are provided
-
-### Phase 3: Generation
-
-1. **Generate OpenAPI spec**
- ```bash
- # For FastAPI
- python -c "from main import app; import json; print(json.dumps(app.openapi()))" > openapi.json
-
- # For Flask with flasgger
- python scripts/generate_swagger.py > swagger.json
- ```
-
-2. **Create Swagger UI**
- - Copy Swagger UI static files to `docs/api/`
- - Configure to load generated spec
- - Test in browser: `http://localhost:8000/docs`
-
-3. **Generate Markdown docs**
- - Use `openapi-to-md` to create human-readable docs
- - Organize by tags/resource groups
- - Add navigation and table of contents
-
-### Phase 4: Validation
-
-1. **Check completeness**
- - All endpoints documented?
- - All parameters described?
- - Example requests provided?
-
-2. **Validate spec**
- ```bash
- openapi-spec-validator openapi.json
- ```
-
-3. **Test interactive docs**
- - Try sample requests in Swagger UI
- - Verify authentication flows work
- - Check response schemas match actual responses
-
-## Examples
-
-### Example 1: FastAPI Application
-
-**User Request**: "Generate API documentation for my FastAPI app"
-
-**Discovery**:
-```
-Found FastAPI application in: main.py
-Endpoints discovered:
-- GET /users (List users)
-- POST /users (Create user)
-- GET /users/{id} (Get user by ID)
-- PUT /users/{id} (Update user)
-- DELETE /users/{id} (Delete user)
-```
-
-**Enhancement**:
-```
-Checking documentation coverage...
-✓ GET /users - Well documented
-✗ POST /users - Missing response examples
-✗ GET /users/{id} - No description
-✗ PUT /users/{id} - No description
-✗ DELETE /users/{id} - No description
-
-Would you like me to add missing documentation?
-```
-
-**User**: Yes
-
-**Adding docs**:
-```python
-@app.get("/users/{id}", summary="Get user by ID")
-async def get_user(id: int):
- """
- Retrieve a single user by their unique ID.
-
- Args:
- id: The unique identifier of the user
-
- Returns:
- User object with id, name, email, and created_at fields
-
- Raises:
- 404: User not found
- """
- # ... implementation
-```
-
-**Generation**:
-```bash
-Generating OpenAPI specification...
-✓ openapi.json created (15.2 KB)
-✓ Swagger UI deployed to docs/api/
-✓ Markdown docs created in docs/api/endpoints/
-
-View documentation at: http://localhost:8000/docs
-```
-
-### Example 2: Flask Application with Custom Schemas
-
-**User Request**: "Document my Flask API and include request/response examples"
-
-**Discovery**:
-```
-Found Flask application with Flask-RESTful
-Endpoints:
-- GET /api/products
-- POST /api/products
-- GET /api/products/
-- PATCH /api/products/
-- DELETE /api/products/
-```
-
-**Custom Examples Added**:
-```python
-class ProductList(Resource):
- def get(self):
- """
- Get all products
-
- Example Response:
- ```json
- {
- "products": [
- {
- "id": 1,
- "name": "Widget",
- "price": 29.99,
- "stock": 100
- }
- ],
- "total": 1
- }
- ```
- """
- pass
-
- def post(self):
- """
- Create a new product
-
- Example Request:
- ```json
- {
- "name": "New Widget",
- "price": 39.99,
- "stock": 50
- }
- ```
-
- Example Response:
- ```json
- {
- "id": 2,
- "name": "New Widget",
- "price": 39.99,
- "stock": 50,
- "created_at": "2025-01-31T12:00:00Z"
- }
- ```
- """
- pass
-```
-
-**Result**:
-```
-Generated documentation:
-- openapi.json (with examples)
-- Swagger UI at /api/docs
-- Postman collection at docs/api/postman_collection.json
-- Markdown API reference at docs/api/README.md
-
-All endpoints now include:
-✓ Request examples
-✓ Response examples
-✓ Error codes
-✓ Authentication requirements
-```
-
-## Configuration
-
-### FastAPI Projects
-
-No additional configuration needed! FastAPI auto-generates OpenAPI docs.
-
-Access at:
-- Swagger UI: `http://localhost:8000/docs`
-- ReDoc: `http://localhost:8000/redoc`
-- OpenAPI JSON: `http://localhost:8000/openapi.json`
-
-### Flask Projects
-
-Install flasgger:
-```bash
-pip install flasgger
-```
-
-Configure in app:
-```python
-from flasgger import Swagger
-
-app = Flask(__name__)
-swagger = Swagger(app, template={
- "info": {
- "title": "My API",
- "description": "API for managing resources",
- "version": "1.0.0"
- }
-})
-```
-
-## Best Practices
-
-- ✅ Use type hints - enables automatic schema generation
-- ✅ Write descriptive docstrings for all endpoints
-- ✅ Provide example requests and responses
-- ✅ Document error codes and edge cases
-- ✅ Keep docs in sync with code (auto-generate when possible)
-
-## Tools Used
-
-- **FastAPI**: Built-in OpenAPI support
-- **flasgger**: Swagger for Flask
-- **openapi-spec-validator**: Validates OpenAPI specs
-- **openapi-to-md**: Converts OpenAPI to Markdown
-
-## References
-
-- [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
-- [FastAPI Documentation](https://fastapi.tiangolo.com/)
-- [Swagger Documentation](https://swagger.io/docs/)
-```
-
-### 为什么这是优秀的工作流 Skill?
-
-1. ✅ **清晰的工作流阶段**: 4 个阶段 (Discovery, Enhancement, Generation, Validation)
-2. ✅ **决策点**: Phase 2 询问用户是否添加缺失文档
-3. ✅ **实际输出示例**: 展示了命令输出和生成的代码
-4. ✅ **多框架支持**: 处理 FastAPI 和 Flask 两种情况
-5. ✅ **工具集成**: 列出所需工具及其用途
-6. ✅ **可执行命令**: 提供完整的命令示例
-7. ✅ **验证步骤**: Phase 4 确保生成的文档质量
-
----
-
-## 示例 3: 代码审查 Skill (高自由度 Skill)
-
-```markdown
----
-name: code-review
-description: Performs comprehensive code reviews focusing on best practices, security, performance, and maintainability. Activates when user asks to review code, check pull request, or mentions code quality. Provides actionable feedback with severity ratings.
----
-
-# Code Review Skill
-
-Conducts thorough code reviews with focus on quality, security, and best practices.
-
-## When to Use This Skill
-
-- User asks to "review my code" or "check this PR"
-- User mentions "code review", "code quality", or "best practices"
-- User wants feedback on specific code changes
-- User needs security or performance analysis
-
-## Review Criteria
-
-Code is evaluated across 5 dimensions:
-
-### 1. Correctness
-- Logic errors and bugs
-- Edge case handling
-- Error handling and validation
-- Type safety
-
-### 2. Security
-- SQL injection vulnerabilities
-- XSS vulnerabilities
-- Authentication/authorization issues
-- Sensitive data exposure
-- Dependency vulnerabilities
-
-### 3. Performance
-- Algorithm efficiency
-- Database query optimization
-- Memory leaks
-- Unnecessary computations
-- Caching opportunities
-
-### 4. Maintainability
-- Code clarity and readability
-- Function/class size
-- Code duplication
-- Naming conventions
-- Documentation
-
-### 5. Best Practices
-- Language-specific idioms
-- Design patterns
-- SOLID principles
-- Testing coverage
-- Error handling patterns
-
-## Review Process
-
-1. **Understand context**
- - What does this code do?
- - What problem does it solve?
- - Are there any constraints or requirements?
-
-2. **Identify issues**
- - Scan for common anti-patterns
- - Check against language best practices
- - Look for security vulnerabilities
- - Assess performance implications
-
-3. **Prioritize feedback**
- - **Critical**: Security issues, data loss risks, crashes
- - **High**: Bugs, major performance issues
- - **Medium**: Code smells, maintainability concerns
- - **Low**: Style preferences, minor optimizations
-
-4. **Provide suggestions**
- - Explain the issue clearly
- - Show better alternative (code example)
- - Explain why the alternative is better
-
-## Example Review
-
-### Code Submitted
-
-```python
-def get_user_data(user_id):
- conn = sqlite3.connect('users.db')
- cursor = conn.cursor()
- query = "SELECT * FROM users WHERE id = " + str(user_id)
- cursor.execute(query)
- result = cursor.fetchone()
- return result
-```
-
-### Review Feedback
-
-**❌ CRITICAL: SQL Injection Vulnerability**
-
-The code concatenates user input directly into SQL query, allowing SQL injection attacks.
-
-**Bad**:
-```python
-query = "SELECT * FROM users WHERE id = " + str(user_id)
-```
-
-**Good**:
-```python
-query = "SELECT * FROM users WHERE id = ?"
-cursor.execute(query, (user_id,))
-```
-
-**Why**: Parameterized queries prevent SQL injection by properly escaping user input.
-
----
-
-**⚠️ HIGH: Resource Leak**
-
-Database connection is never closed, leading to resource exhaustion under load.
-
-**Bad**:
-```python
-conn = sqlite3.connect('users.db')
-# ... use connection
-# connection never closed
-```
-
-**Good**:
-```python
-with sqlite3.connect('users.db') as conn:
- cursor = conn.cursor()
- # ... use connection
- # automatically closed when exiting with block
-```
-
----
-
-**ℹ️ MEDIUM: Overly Broad SELECT**
-
-Using `SELECT *` fetches unnecessary data and is fragile to schema changes.
-
-**Bad**:
-```python
-query = "SELECT * FROM users WHERE id = ?"
-```
-
-**Good**:
-```python
-query = "SELECT id, name, email FROM users WHERE id = ?"
-```
-
-**Why**: Explicit column selection is more efficient and makes intent clear.
-
----
-
-**📝 LOW: Missing Error Handling**
-
-Function doesn't handle case where user doesn't exist.
-
-**Suggestion**:
-```python
-def get_user_data(user_id: int) -> Optional[dict]:
- """
- Retrieve user data by ID.
-
- Args:
- user_id: The unique identifier of the user
-
- Returns:
- Dictionary with user data, or None if user not found
- """
- with sqlite3.connect('users.db') as conn:
- cursor = conn.cursor()
- query = "SELECT id, name, email FROM users WHERE id = ?"
- cursor.execute(query, (user_id,))
- result = cursor.fetchone()
-
- if result is None:
- return None
-
- return {
- 'id': result[0],
- 'name': result[1],
- 'email': result[2]
- }
-```
-
-### Revised Code
-
-After applying all suggestions:
-
-```python
-from typing import Optional
-import sqlite3
-
-def get_user_data(user_id: int) -> Optional[dict]:
- """
- Retrieve user data by ID.
-
- Args:
- user_id: The unique identifier of the user
-
- Returns:
- Dictionary with user data, or None if user not found
-
- Raises:
- ValueError: If user_id is not a positive integer
- """
- if not isinstance(user_id, int) or user_id <= 0:
- raise ValueError(f"Invalid user_id: {user_id}")
-
- with sqlite3.connect('users.db') as conn:
- conn.row_factory = sqlite3.Row # Enable dict-like access
- cursor = conn.cursor()
-
- query = "SELECT id, name, email, created_at FROM users WHERE id = ?"
- cursor.execute(query, (user_id,))
- result = cursor.fetchone()
-
- if result is None:
- return None
-
- return dict(result) # Convert Row to dict
-```
-
-### Summary
-
-**Issues Found**: 4
-- 1 Critical (SQL Injection)
-- 1 High (Resource Leak)
-- 1 Medium (Inefficient Query)
-- 1 Low (Missing Error Handling)
-
-**All Issues Addressed**: ✓
-
-## Best Practices
-
-### When Reviewing
-
-- 🎯 Focus on impact - prioritize critical issues
-- 📝 Be specific - provide code examples
-- 🎓 Be educational - explain why, not just what
-- 🤝 Be constructive - suggest improvements, don't just criticize
-- ⚖️ Be balanced - acknowledge good practices too
-
-### What to Look For
-
-**Python-specific**:
-- Use of `with` for resource management
-- Type hints on function signatures
-- Proper exception handling
-- List comprehensions vs loops
-- Dictionary vs if-elif chains
-
-**General**:
-- DRY principle violations
-- Magic numbers
-- Long functions (>50 lines)
-- Deep nesting (>3 levels)
-- Missing tests for critical paths
-
-## Automated Tools
-
-Complement manual review with automated tools:
-
-```bash
-# Linting
-pylint mycode.py
-flake8 mycode.py
-
-# Type checking
-mypy mycode.py
-
-# Security scanning
-bandit -r .
-safety check
-
-# Code complexity
-radon cc mycode.py -a
-```
-
-## References
-
-- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
-- [Python Best Practices](https://docs.python-guide.org/)
-- [Clean Code Principles](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)
-```
-
-### 为什么这是高自由度 Skill?
-
-1. ✅ **指导原则而非严格步骤**: 提供评审维度,不限定具体流程
-2. ✅ **情境适应**: 根据代码类型和问题严重性调整重点
-3. ✅ **教育性**: 解释"为什么",帮助 Claude 做出判断
-4. ✅ **优先级框架**: 定义严重性级别,让 Claude 自行判断
-5. ✅ **完整示例**: 展示从问题识别到解决的完整流程
-6. ✅ **工具集成**: 提到自动化工具,但不强制使用
-
----
-
-## 总结: 好 Skill 的共同特征
-
-| 特征 | 说明 | 示例位置 |
-|------|------|---------|
-| **清晰触发** | description 包含关键词和场景 | 所有 frontmatter |
-| **结构化内容** | 使用标题、列表、代码块组织信息 | 所有示例 |
-| **实际示例** | 真实代码,不是伪代码 | Example sections |
-| **决策指导** | 告诉 Claude 何时做什么 | 工作流 Skill 的 Phase 2 |
-| **可执行命令** | 提供完整的命令,不是抽象描述 | 迁移 Skill 的命令 |
-| **错误处理** | 包含故障排除章节 | 所有 Troubleshooting |
-| **最佳实践** | Do/Don't 清单 | 所有 Best Practices |
-| **工具引用** | 说明使用哪些工具及如何使用 | API 文档 Skill |
-| **验证步骤** | 说明如何确认操作成功 | 迁移 Skill 的验证 |
-| **合适的自由度** | 根据任务特性选择指导程度 | 代码审查 Skill |
diff --git a/.claude/skills/system-create_skill_file/templates/basic-skill-template.md b/.claude/skills/system-create_skill_file/templates/basic-skill-template.md
deleted file mode 100644
index 8ff71762d1..0000000000
--- a/.claude/skills/system-create_skill_file/templates/basic-skill-template.md
+++ /dev/null
@@ -1,95 +0,0 @@
----
-name: your-skill-name
-description: Brief description of what this skill does and when to activate it. Include trigger keywords and scenarios where this skill should be used.
----
-
-# Your Skill Title
-
-> Brief one-line summary of what this skill accomplishes
-
-## When to Use This Skill
-
-- User asks to [specific action or task]
-- User mentions keywords like "[keyword1]", "[keyword2]", or "[keyword3]"
-- User is working with [specific technology/framework/tool]
-- User needs to [specific outcome or goal]
-
-## Quick Start
-
-```bash
-# Basic usage example
-command-to-run --option value
-```
-
-## How It Works
-
-1. **Step 1**: Brief description of first step
- - Detail about what happens
- - Any prerequisites or conditions
-
-2. **Step 2**: Brief description of second step
- - Key actions taken
- - Expected outputs
-
-3. **Step 3**: Brief description of final step
- - Validation or verification
- - Success criteria
-
-## Examples
-
-### Example 1: Basic Usage
-
-**User Request**: "Example of what user might say"
-
-**Action**: What Claude does in response
-
-**Output**:
-```
-Expected output or result
-```
-
-### Example 2: Advanced Usage
-
-**User Request**: "More complex user request"
-
-**Action**:
-1. First action taken
-2. Second action taken
-3. Final action
-
-**Output**:
-```
-Expected output showing more complex results
-```
-
-## Best Practices
-
-- ✅ Do this for best results
-- ✅ Follow this pattern
-- ❌ Avoid this common mistake
-- ❌ Don't do this
-
-## Troubleshooting
-
-### Common Issue 1
-
-**Problem**: Description of the problem
-
-**Solution**: How to fix it
-
-### Common Issue 2
-
-**Problem**: Description of another problem
-
-**Solution**: Steps to resolve
-
-## References
-
-- [Related Documentation](link-to-docs)
-- [Official Guide](link-to-guide)
-- [Additional Resources](link-to-resources)
-
----
-
-**Version**: 1.0
-**Last Updated**: YYYY-MM-DD
\ No newline at end of file
diff --git a/.claude/skills/system-create_skill_file/templates/workflow-skill-template.md b/.claude/skills/system-create_skill_file/templates/workflow-skill-template.md
deleted file mode 100644
index 6fd6522bad..0000000000
--- a/.claude/skills/system-create_skill_file/templates/workflow-skill-template.md
+++ /dev/null
@@ -1,402 +0,0 @@
----
-name: your-workflow-skill
-description: Guides Claude through a multi-step workflow for [specific task]. Activates when user needs to [trigger scenario] or mentions [key terms].
----
-
-# Your Workflow Skill Title
-
-> Automates a complex multi-step process with decision points and validation
-
-## When to Use This Skill
-
-- User needs to execute a multi-step workflow
-- User asks to "[workflow trigger phrase]"
-- User is working on [specific type of project or task]
-- Task requires validation and error handling at each step
-
-## Workflow Overview
-
-```
-┌─────────────┐
-│ Start │
-└──────┬──────┘
- │
- ▼
-┌─────────────────┐
-│ Preparation │
-│ & Validation │
-└────────┬────────┘
- │
- ┌────▼────┐
- │ Step 1 │
- └────┬────┘
- │
- ┌────▼────┐
- │ Step 2 │──┐
- └────┬────┘ │ (Loop if needed)
- │ │
- └───────┘
- │
- ┌────▼────┐
- │ Step 3 │
- └────┬────┘
- │
- ▼
- ┌─────────────┐
- │ Complete │
- │ & Report │
- └─────────────┘
-```
-
-## Detailed Workflow
-
-### Preparation Phase
-
-Before starting the main workflow:
-
-- [ ] Check prerequisite 1
-- [ ] Validate prerequisite 2
-- [ ] Ensure prerequisite 3 is met
-
-If any prerequisite fails:
-- Stop execution
-- Report which prerequisite failed
-- Provide remediation steps
-
-### Step 1: [Step Name]
-
-**Purpose**: What this step accomplishes
-
-**Actions**:
-1. Action 1
-2. Action 2
-3. Action 3
-
-**Validation**:
-- Check condition 1
-- Verify condition 2
-
-**On Success**: → Proceed to Step 2
-**On Failure**: → [Error handling procedure]
-
-### Step 2: [Step Name]
-
-**Purpose**: What this step accomplishes
-
-**Actions**:
-1. Action 1
-2. Action 2
-
-**Decision Point**:
-- If condition A: → Action X
-- If condition B: → Action Y
-- Otherwise: → Default action
-
-**Validation**:
-- Verify expected output
-- Check for errors
-
-**On Success**: → Proceed to Step 3
-**On Failure**: → [Error handling procedure]
-
-### Step 3: [Step Name]
-
-**Purpose**: Final actions and cleanup
-
-**Actions**:
-1. Finalize changes
-2. Run validation tests
-3. Generate summary report
-
-**Success Criteria**:
-- All tests pass
-- No errors in logs
-- Expected artifacts created
-
-## Examples
-
-### Example 1: Standard Workflow Execution
-
-**User Request**: "Run the [workflow name]"
-
-**Execution**:
-
-**Preparation Phase** ✓
-```
-✓ Prerequisite 1 met
-✓ Prerequisite 2 validated
-✓ Ready to begin
-```
-
-**Step 1: [Step Name]** ✓
-```
-→ Action 1 completed
-→ Action 2 completed
-→ Validation passed
-```
-
-**Step 2: [Step Name]** ✓
-```
-→ Decision: Condition A detected
-→ Executing Action X
-→ Validation passed
-```
-
-**Step 3: [Step Name]** ✓
-```
-→ Finalization complete
-→ All tests passed
-→ Summary generated
-```
-
-**Result**: Workflow completed successfully
-
-### Example 2: Workflow with Error Recovery
-
-**User Request**: "Execute [workflow name]"
-
-**Execution**:
-
-**Step 1** ✓
-```
-→ Completed successfully
-```
-
-**Step 2** ⚠️
-```
-→ Action 1 completed
-→ Action 2 failed: [Error message]
-```
-
-**Error Recovery**:
-1. Identified root cause: [Explanation]
-2. Applied fix: [Fix description]
-3. Retrying Step 2...
-
-**Step 2 (Retry)** ✓
-```
-→ Completed after fix
-```
-
-**Step 3** ✓
-```
-→ Completed successfully
-```
-
-**Result**: Workflow completed with 1 retry
-
-## Error Handling
-
-### Error Categories
-
-| Category | Action |
-|----------|--------|
-| **Recoverable** | Attempt automatic fix, retry up to 3 times |
-| **User Input Needed** | Pause workflow, ask user for guidance |
-| **Critical** | Stop workflow, rollback changes if possible |
-
-### Common Errors
-
-**Error 1: [Error Name]**
-- **Cause**: What causes this error
-- **Detection**: How to identify it
-- **Recovery**: Steps to fix
- 1. Recovery action 1
- 2. Recovery action 2
- 3. Retry from failed step
-
-**Error 2: [Error Name]**
-- **Cause**: What causes this error
-- **Detection**: How to identify it
-- **Recovery**: Manual intervention required
- - Ask user: "[Question to ask]"
- - Wait for user input
- - Apply user's guidance
- - Resume workflow
-
-## Rollback Procedure
-
-If the workflow fails critically:
-
-1. **Identify last successful step**
- - Step 1: ✓ Completed
- - Step 2: ❌ Failed at action 3
-
-2. **Undo changes from failed step**
- - Revert action 1
- - Revert action 2
- - Clean up partial state
-
-3. **Verify system state**
- - Confirm rollback successful
- - Check for side effects
-
-4. **Report to user**
- ```
- Workflow failed at Step 2, action 3
- Reason: [Error message]
- All changes have been rolled back
- System is back to pre-workflow state
- ```
-
-## Workflow Variations
-
-### Variation 1: Quick Mode
-
-**When to use**: User needs faster execution, can accept lower validation
-
-**Changes**:
-- Skip optional validations
-- Use cached data where available
-- Reduce logging verbosity
-
-**Trade-offs**:
-- ⚡ 50% faster
-- ⚠️ Less detailed error messages
-
-### Variation 2: Strict Mode
-
-**When to use**: Production deployments, critical changes
-
-**Changes**:
-- Enable all validations
-- Require explicit user confirmation at each step
-- Generate detailed audit logs
-
-**Trade-offs**:
-- 🛡️ Maximum safety
-- 🐢 Slower execution
-
-## Monitoring and Logging
-
-Throughout the workflow:
-
-```
-[TIMESTAMP] [STEP] [STATUS] Message
-
-[2025-01-31 14:30:01] [PREP] [INFO] Starting preparation phase
-[2025-01-31 14:30:02] [PREP] [OK] All prerequisites met
-[2025-01-31 14:30:03] [STEP1] [INFO] Beginning Step 1
-[2025-01-31 14:30:05] [STEP1] [OK] Step 1 completed successfully
-[2025-01-31 14:30:06] [STEP2] [INFO] Beginning Step 2
-[2025-01-31 14:30:08] [STEP2] [WARN] Condition B detected, using fallback
-[2025-01-31 14:30:10] [STEP2] [OK] Step 2 completed with warnings
-[2025-01-31 14:30:11] [STEP3] [INFO] Beginning Step 3
-[2025-01-31 14:30:15] [STEP3] [OK] Step 3 completed successfully
-[2025-01-31 14:30:16] [COMPLETE] [OK] Workflow finished successfully
-```
-
-## Post-Workflow Report
-
-After completion, generate a summary:
-
-```markdown
-# Workflow Execution Report
-
-**Workflow**: [Workflow Name]
-**Started**: 2025-01-31 14:30:01
-**Completed**: 2025-01-31 14:30:16
-**Duration**: 15 seconds
-**Status**: ✓ Success
-
-## Steps Executed
-
-1. ✓ Preparation Phase (1s)
-2. ✓ Step 1: [Step Name] (2s)
-3. ✓ Step 2: [Step Name] (4s) - 1 warning
-4. ✓ Step 3: [Step Name] (4s)
-
-## Warnings
-
-- Step 2: Condition B detected, used fallback action
-
-## Artifacts Generated
-
-- `/path/to/output1.txt`
-- `/path/to/output2.json`
-- `/path/to/report.html`
-
-## Next Steps
-
-- Review generated artifacts
-- Deploy to production (if applicable)
-- Archive logs to `/logs/workflow-20250131-143001.log`
-```
-
-## Best Practices
-
-### Do
-
-- ✅ Validate inputs before starting workflow
-- ✅ Provide clear progress updates at each step
-- ✅ Log all decisions and actions
-- ✅ Handle errors gracefully with recovery options
-- ✅ Generate summary report at completion
-
-### Don't
-
-- ❌ Skip validation steps to save time
-- ❌ Continue after critical errors
-- ❌ Assume prerequisites are met without checking
-- ❌ Lose partial progress on failure
-- ❌ Leave system in inconsistent state
-
-## Advanced Features
-
-### Parallel Execution
-
-Some steps can run in parallel:
-
-```
-Step 1 ─┬─→ Step 2A ─┐
- │ ├─→ Step 3
- └─→ Step 2B ─┘
-```
-
-**Requirements**:
-- Steps 2A and 2B must be independent
-- Both must complete before Step 3
-
-**Implementation**:
-1. Start Step 2A in background
-2. Start Step 2B in background
-3. Wait for both to complete
-4. Verify both succeeded
-5. Proceed to Step 3
-
-### Conditional Branching
-
-```
-Step 1 → Decision
- ├─→ [Condition A] → Path A → Step 3
- ├─→ [Condition B] → Path B → Step 3
- └─→ [Default] → Path C → Step 3
-```
-
-## Testing This Workflow
-
-To test the workflow without side effects:
-
-1. Use `--dry-run` flag to simulate execution
-2. Check that all steps are logged correctly
-3. Verify error handling with intentional failures
-4. Confirm rollback procedure works
-
-Example:
-```bash
-workflow-runner --dry-run --inject-error step2
-```
-
-Expected output:
-```
-[DRY RUN] Step 1: Would execute [actions]
-[DRY RUN] Step 2: Injected error as requested
-[DRY RUN] Error Recovery: Would attempt fix
-[DRY RUN] Rollback: Would undo Step 1 changes
-```
-
----
-
-**Version**: 1.0
-**Last Updated**: YYYY-MM-DD
-**Maintainer**: Team Name
\ No newline at end of file
diff --git a/document/content/docs/faq/app.en.mdx b/document/content/docs/faq/app.en.mdx
new file mode 100644
index 0000000000..e6e3eaf7dc
--- /dev/null
+++ b/document/content/docs/faq/app.en.mdx
@@ -0,0 +1,77 @@
+---
+title: App Usage
+description: Common questions about using FastGPT apps, including simple apps, workflows, and plugins
+---
+
+## How do I get the Question Classification node to work correctly across multi-turn conversations?
+
+The Question Classification node has access to conversation context. When two consecutive questions are closely related, the model can usually classify them accurately based on their connection. For example, if a user asks "How do I use this feature?" followed by "What are the limitations?", the model leverages context to understand and respond correctly.
+
+However, when consecutive questions have little relation to each other, classification accuracy may drop. To handle this, you can use a global variable to store the classification result. In subsequent classification steps, check the global variable first — if a result exists, reuse it; otherwise, let the model classify on its own.
+
+Tip: Build batch test scripts to evaluate your question classification accuracy.
+
+## When does scheduled execution trigger?
+
+If a user opens a shared link and stays on the page, scheduled execution still works as expected — it takes effect after the app is published and runs in the background.
+
+## In V4.8.18-FIX2, it says "Fixed HTTP node `{{}}` variable reference compatibility. Please switch to the / pattern for variables — `{{}}` syntax is deprecated." Does this only affect HTTP nodes, or all nodes?
+
+Only HTTP nodes use this syntax.
+
+## My workflow app works fine in preview but breaks after publishing to a no-login window.
+
+This is usually caused by not publishing correctly. Click **Save and Publish** in the top-right corner of the workflow editor.
+
+## How do I make "Suggested Questions" display in Chinese?
+
+Make sure you're on V4.8.17 or later, then change the suggested questions prompt to Chinese.
+
+
+## How do I stop AI responses from using Markdown formatting?
+
+Edit the Knowledge Base default prompt. The built-in standard template instructs the model to use Markdown. You can remove that requirement:
+
+| | |
+| --- | --- |
+|  |  |
+
+## Why does my app behave differently across different sources?
+
+Q: The app produces different results in debug mode vs. production, or when called via API.
+
+A: This is usually caused by differences in context. Check the conversation logs, find the relevant entry, and compare the run details side by side.
+
+| | | |
+| --- | --- | --- |
+|  |  |  |
+The Knowledge Base response settings require a custom prompt. Without one, the default prompt (which includes Markdown formatting instructions) is used.
+
+## How do I route follow-up questions directly to the Knowledge Base instead of going through Question Classification again?
+
+Scenario: A workflow starts with a Question Classification node that routes to different branches, each with its own Knowledge Base and AI Chat. After the first AI response, you want subsequent questions to skip classification and go straight to the Knowledge Base with chat history as context.
+
+Solution: Add a condition check — if it's the first message (history count is 0), route through Question Classification. Otherwise, go directly to the Knowledge Base and AI Chat.
+
+## Can I set up real-time polling to fetch webhook messages every 3000ms?
+
+Scheduled execution doesn't support that kind of frequency. To build a real-time chatbot in WeCom, low-code workflows won't cut it — you'll need to write custom code that calls FastGPT's API Key for responses. WeCom doesn't provide an auto-listen interface for group messages (though you can trigger message pushes by @mentioning the bot). You can either send messages to the app and receive pushes via the [message callback API](https://developer.work.weixin.qq.com/document/path/90238), or poll for group messages using [this API](https://developer.work.weixin.qq.com/document/path/98914) and push responses via [this API](https://developer.work.weixin.qq.com/document/path/90248).
+
+## Can workflows connect to a database?
+
+Yes. Workflows support database connections. The database connection plugin can implement text-to-SQL, but it's risky — write operations are not recommended.
+
+
+
+## How does the Loop node work?
+
+Think of it like a `for` loop — you pass in an array, and the loop body executes once for each element. Variables inside the loop are scoped locally to each iteration.
+
+## Formulas aren't rendering correctly
+
+Add a prompt to guide the model to output formulas in LaTeX/Markdown format:
+
+```bash
+Latex inline: \(x^2\)
+Latex block: $$e=mc^2$$
+```
diff --git a/document/content/docs/faq/chat.en.mdx b/document/content/docs/faq/chat.en.mdx
new file mode 100644
index 0000000000..2ca913f9b7
--- /dev/null
+++ b/document/content/docs/faq/chat.en.mdx
@@ -0,0 +1,14 @@
+---
+title: Chat Interface
+description: Common FastGPT chat interface questions
+---
+
+## I updated my app in the workspace, but the chat isn't reflecting the changes?
+
+You need to publish the app first. Chat only picks up changes after publishing.
+
+## Browser doesn't support voice input
+
+1. Make sure microphone permissions are enabled in both your browser and OS settings.
+2. Confirm the browser has permission to use the microphone for this site, and that the correct microphone source is selected.
+3. The site must have an SSL certificate for microphone access to work.
diff --git a/document/content/docs/faq/dataset.en.mdx b/document/content/docs/faq/dataset.en.mdx
new file mode 100644
index 0000000000..0dc2b5ae59
--- /dev/null
+++ b/document/content/docs/faq/dataset.en.mdx
@@ -0,0 +1,75 @@
+---
+title: Knowledge Base Usage
+description: Common Knowledge Base usage questions
+---
+
+## Uploaded file content shows garbled characters
+
+Re-save the file with UTF-8 encoding.
+
+## What's the difference between the File Processing Model and the Index Model in Knowledge Base settings?
+
+* **File Processing Model**: Used for **Enhanced Processing** and **Q&A Splitting** during data ingestion. Enhanced Processing generates related questions and summaries; Q&A Splitting generates question-answer pairs.
+* **Index Model**: Used for vectorization — it processes and organizes text data into a structure optimized for fast retrieval.
+
+## Does the Knowledge Base support Excel files?
+
+Yes. You can upload xlsx and other spreadsheet formats, not just CSV.
+
+## How are Knowledge Base tokens calculated?
+
+All token counts use the GPT-3.5 tokenizer as the standard.
+
+## I accidentally deleted the rerank model. How do I add it back?
+
+
+
+Add the rerank model configuration in your `config.json` file, then you'll be able to select it again.
+
+## If I created apps and Knowledge Bases on the cloud platform, will my data be deleted if I don't renew right away?
+
+On the free plan, Knowledge Base data is cleared after 30 days of inactivity (no login). Apps are not affected. Paid plans automatically downgrade to the free plan upon expiration.
+
+
+## The AI stops responding mid-answer when there are too many relevant Knowledge Base results.
+
+FastGPT calculates the maximum response length as:
+
+Max Response = min(Configured Max Response, Max Context Window - History)
+
+For example, with an 18K context model, input + output share the same window. As output grows, available input shrinks.
+
+To fix this:
+
+1. Check your configured max response (response limit) setting.
+2. Reduce input to free up space for output — specifically, reduce the number of chat history turns included in the workflow.
+
+Where to find the max response setting:
+
+
+
+
+
+For self-hosted deployments, you can reserve headroom when configuring model context limits. For example, set a 128K model to 120K — the remaining space will be allocated to output.
+
+
+## I'm hitting context limit errors before reaching the configured number of chat history turns.
+
+FastGPT calculates the maximum response length as:
+
+Max Response = min(Configured Max Response, Max Context Window - History)
+
+For example, with an 18K context model, input + output share the same window. As output grows, available input shrinks.
+
+To fix this:
+
+1. Check your configured max response (response limit) setting.
+2. Reduce input to free up space for output — specifically, reduce the number of chat history turns included in the workflow.
+
+Where to find the max response setting:
+
+
+
+
+
+For self-hosted deployments, you can reserve headroom when configuring model context limits. For example, set a 128K model to 120K — the remaining space will be allocated to output.
diff --git a/document/content/docs/faq/error.en.mdx b/document/content/docs/faq/error.en.mdx
new file mode 100644
index 0000000000..ef6479462d
--- /dev/null
+++ b/document/content/docs/faq/error.en.mdx
@@ -0,0 +1,11 @@
+---
+title: Errors
+---
+
+1. ### "Current group upstream load is saturated, please try again later" (request id: 202407100753411462086782835521)
+
+This is an OneAPI channel issue. Try switching to a different model or a different relay provider.
+
+1. ### "Connection Error" in logs when using the API
+
+Most likely the API key is pointing to OpenAI's API, but the server is deployed in mainland China and can't reach overseas endpoints. Use a relay service or reverse proxy to resolve the connectivity issue.
diff --git a/document/content/docs/faq/external_channel_integration.en.mdx b/document/content/docs/faq/external_channel_integration.en.mdx
new file mode 100644
index 0000000000..76c7c673ec
--- /dev/null
+++ b/document/content/docs/faq/external_channel_integration.en.mdx
@@ -0,0 +1,14 @@
+---
+title: External Channel Integration
+description: How to integrate FastGPT with external channels and platforms
+---
+
+1. ### Images don't display inline when using CoW for image-text conversations
+
+Use prompts to instruct the model not to output in Markdown format. To display images directly, you'll need to customize CoW to extract image URLs and send them as native image messages.
+
+1. ### Can I access user Q&A records?
+
+Yes — check the conversation logs in your app.
+
+
diff --git a/document/content/docs/faq/index.en.mdx b/document/content/docs/faq/index.en.mdx
new file mode 100644
index 0000000000..6c1df1df14
--- /dev/null
+++ b/document/content/docs/faq/index.en.mdx
@@ -0,0 +1,8 @@
+---
+title: FAQ
+description: FastGPT frequently asked questions
+---
+
+import { Redirect } from '@/components/docs/Redirect';
+
+
diff --git a/document/content/docs/faq/meta.en.json b/document/content/docs/faq/meta.en.json
new file mode 100644
index 0000000000..e48398132a
--- /dev/null
+++ b/document/content/docs/faq/meta.en.json
@@ -0,0 +1,14 @@
+{
+ "root": true,
+ "title": "FAQ",
+ "description": "FastGPT FAQ",
+ "pages": [
+ "app",
+ "chat",
+ "dataset",
+ "external_channel_integration",
+ "error",
+ "points_consumption",
+ "other"
+ ]
+}
diff --git a/document/content/docs/faq/other.en.mdx b/document/content/docs/faq/other.en.mdx
new file mode 100644
index 0000000000..8bf2e9e666
--- /dev/null
+++ b/document/content/docs/faq/other.en.mdx
@@ -0,0 +1,11 @@
+---
+title: Other Questions
+---
+
+## What's the OneAPI official website?
+
+There's no official website — just the open-source README on GitHub: https://github.com/songquanpeng/one-api
+
+## Is multi-user support available?
+
+The community edition does not support multiple users. Multi-user support is only available in the commercial edition.
diff --git a/document/content/docs/faq/points_consumption.en.mdx b/document/content/docs/faq/points_consumption.en.mdx
new file mode 100644
index 0000000000..3f933a850d
--- /dev/null
+++ b/document/content/docs/faq/points_consumption.en.mdx
@@ -0,0 +1,10 @@
+---
+title: Points Consumption
+description: Understanding how points are consumed in FastGPT
+---
+
+1. ### I connected OneAPI, so why is FastGPT still consuming points?
+
+Vector database searches consume points by default. Check your usage records and billing details for more information.
+
+
diff --git a/document/content/docs/introduction/cloud.en.mdx b/document/content/docs/introduction/cloud.en.mdx
new file mode 100644
index 0000000000..163a140487
--- /dev/null
+++ b/document/content/docs/introduction/cloud.en.mdx
@@ -0,0 +1,11 @@
+---
+title: FastGPT Cloud Service
+description: FastGPT Cloud Service
+---
+
+## Service URLs
+
+- [China Mainland: https://fastgpt.cn](https://fastgpt.cn)
+- [International: https://fastgpt.io](https://fastgpt.io)
+
+Register based on your needs. Accounts are not shared between the two versions.
diff --git a/document/content/docs/introduction/commercial.en.mdx b/document/content/docs/introduction/commercial.en.mdx
new file mode 100644
index 0000000000..ad1b01b479
--- /dev/null
+++ b/document/content/docs/introduction/commercial.en.mdx
@@ -0,0 +1,109 @@
+---
+title: 'FastGPT Commercial Edition'
+description: 'FastGPT Commercial Edition overview'
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Overview
+
+FastGPT Commercial Edition is an enhanced version built on top of the Community Edition with additional exclusive features. Simply install the commercial image and configure the internal network address on your existing Community Edition setup to get started.
+
+## Feature Comparison
+
+| | Community Edition | Commercial Edition | Cloud Service |
+| ------------------------------ | ------------------------------------------ | ------ | ------- |
+| **App Building** | | | |
+| Workflow orchestration | ✅ | ✅ | ✅ |
+| Share links and API | ✅ | ✅ | ✅ |
+| App publishing security config | ❌ | ✅ | ✅ |
+| Third-party publishing (Lark, WeChat Official Account) | ❌ | ✅ | ✅ |
+| Run log dashboard | ❌ | ✅ | ✅ |
+| App evaluation | ❌ | ✅ | ✅ |
+| **Knowledge Base** | | | |
+| Knowledge base | ✅ | ✅ | ✅ |
+| Third-party knowledge base scheduled sync | ❌ | ✅ | ✅ |
+| Knowledge base index enhancement | ❌ | ✅ | ✅ |
+| Website sync | ❌ | ✅ | ✅ |
+| Image knowledge base | ❌ | ✅ | ✅ |
+| **General Features** | | | |
+| Multi-model configuration | ✅ | ✅ | ✅ |
+| Model log dashboard | ✅ | ✅ | ✅ |
+| Model content moderation | ❌ | ✅ | ✅ |
+| **Enterprise Features** | | | |
+| Custom branding | ❌ | ✅ | In design |
+| Multi-tenancy & billing | ❌ | ✅ | ✅ |
+| Team spaces & permissions | ❌ | ✅ | ✅ |
+| Admin dashboard | ❌ | ✅ | Not needed |
+| SSO login | ❌ | ✅ | In design |
+| Commercial license | [View open source license](/docs/protocol/open-source) | Full | Full |
+
+## Pricing
+
+FastGPT Commercial Edition offers 3 pricing models based on deployment type. Below are the common details for each. If you have further questions, [contact us](https://fael3z0zfze.feishu.cn/share/base/form/shrcnjJWtKqjOI9NbQTzhNyzljc).
+
+**Included with all plans**
+
+1. SaaS commercial license — use for any commercial purpose during the license period.
+2. Free initial deployment assistance.
+3. Priority support ticket handling.
+
+**Plan-specific features**
+
+| Deployment Type | Included Features | Time to Launch | Starting Price |
+| ---------------------- | ------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------- |
+| Sealos Fully Managed | 1. Free upgrades during license period. 2. No ops or database management needed. | Half day | Starting at ¥10,000/month (3-month minimum) or Starting at ¥120,000/year 8C32G resources; additional resources billed separately. |
+| Sealos Fully Managed (Multi-node) | 1. Free upgrades during license period. 2. No ops or database management needed. | Half day | Starting at ¥22,000/month (3-month minimum) or Starting at ¥264,000/year 32C128G resources; additional resources billed separately. |
+| Self-hosted | 1. Free upgrade support for 6 versions. | Within 14 days | [Contact us for pricing](https://fael3z0zfze.feishu.cn/share/base/form/shrcnjJWtKqjOI9NbQTzhNyzljc) |
+
+
+ - "6 versions of upgrade support" means the FastGPT team assists with 6 upgrades — not that the software stops working after 6 versions. Most upgrades are straightforward enough to handle yourself.
+ - Fully managed is ideal for teams without dedicated ops staff — just focus on your business.
+ - Self-hosted gives you full control with deployment on your own servers.
+ - Single-node is suitable for small to mid-sized teams providing internal services; you'll manage database backups yourself.
+ - High-availability is designed for public-facing services, including visual monitoring, replicas, load balancing, and automated database backups.
+
+
+## Contact Us
+
+Fill out the [inquiry form](https://fael3z0zfze.feishu.cn/share/base/form/shrcnjJWtKqjOI9NbQTzhNyzljc) and we'll get back to you shortly.
+
+## Technical Support
+
+### App Customization
+
+We can build custom workflow orchestrations tailored to your needs, delivered as a complete app configuration. Pricing is negotiable based on scope.
+
+### Technical Services (Custom Development, Maintenance, Migration, Third-party Integration)
+
+¥2,000 – ¥3,000 per person per day
+
+### Upgrade Fees
+
+Most upgrades just require pulling the new image and running the initialization script — no extra steps needed.
+
+For cross-version or complex upgrades, follow the documentation to upgrade yourself, or pay for support at the standard technical service rate.
+
+## FAQ
+
+### How is delivery handled?
+
+Full application = Community Edition image + Commercial Edition image
+
+We provide a Commercial Edition image that requires a License to start.
+
+### How does custom development work?
+
+You can modify the Community Edition source code, but the Commercial Edition image cannot be modified. Since the full version = Community Edition + Commercial Edition image, you can customize part of the codebase. However, if you fork the code, you'll need to handle code merges yourself during future upgrades.
+
+### Sealos Usage Costs
+
+Sealos cloud services use pay-as-you-go billing. Here's the pricing table:
+
+
+
+## Admin Dashboard Screenshots
+
+| | | |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+|  |  |  |
diff --git a/document/content/docs/introduction/development/configuration.en.mdx b/document/content/docs/introduction/development/configuration.en.mdx
new file mode 100644
index 0000000000..057e0c7132
--- /dev/null
+++ b/document/content/docs/introduction/development/configuration.en.mdx
@@ -0,0 +1,73 @@
+---
+title: Configuration File Guide
+description: FastGPT configuration parameters explained
+---
+
+Since environment variables aren't ideal for complex configurations, newer versions of FastGPT use ConfigMap-style mounted configuration files. You can find the default config at `projects/app/data/config.json`. See the [Docker Compose deployment guide](/docs/introduction/development/docker/) for how to mount the config file.
+
+**In development**, copy the example config `config.json` to `config.local.json` for it to take effect.
+
+The example below includes system parameters and model configurations:
+
+## Config File Example (v4.8.20+)
+
+> Starting from v4.8.20, models are configured through the UI.
+
+```json
+{
+ "feConfigs": {
+ "lafEnv": "https://laf.dev" // Laf environment. Use https://laf.run (Hangzhou Alibaba Cloud) or your private Laf instance. Laf OpenAPI requires the latest version of Laf.
+ },
+ "systemEnv": {
+ "vectorMaxProcess": 15, // Vector processing thread count
+ "qaMaxProcess": 15, // Q&A splitting thread count
+ "vlmMaxProcess": 15, // Vision-language model max processing threads
+ "tokenWorkers": 50, // Token calculation worker count — keeps memory occupied, don't set too high
+ "hnswEfSearch": 100, // Vector search parameter (PG and OB only). Higher = more accurate but slower. 100 gives 99%+ accuracy.
+ "customPdfParse": {
+ // Added in v4.9.0
+ "url": "", // Custom PDF parsing service URL
+ "key": "", // Custom PDF parsing service key
+ "doc2xKey": "", // Doc2x service key
+ "price": 0 // PDF parsing service price
+ }
+ }
+}
+```
+
+## Custom PDF Parsing Configuration
+
+Custom PDF parsing takes priority over Doc2x. If you're using Doc2x, don't configure a custom PDF service.
+
+### Using Sealos PDF Parsing Service
+
+#### 1. Get a Sealos AI Proxy API Key
+
+[Open Sealos PDF Parser](https://hzh.sealos.run/?uid=fnWRt09fZP&openapp=system-aiproxy) and apply for an API key.
+
+#### 2. Update FastGPT Configuration
+
+Set `systemEnv.customPdfParse.url` to `https://aiproxy.hzh.sealos.run/v1/parse/pdf?model=parse-pdf`
+Set `systemEnv.customPdfParse.key` to the API key from Sealos AI Proxy.
+
+### Using Doc2x for PDF Parsing
+
+`Doc2x` is a professional PDF parsing service.
+
+#### 1. Sign Up for Doc2x
+
+[Open Doc2x website](https://doc2x.noedgeai.com?inviteCode=9EACN2) and apply for an API key.
+
+#### 2. Update FastGPT Configuration
+
+Community Edition users: add `systemEnv.customPdfParse.doc2xKey` to your `config.json` with the API key, then restart the service.
+
+Commercial Edition users: fill in the Doc2x service key in the Admin dashboard following the form instructions.
+
+#### 3. Start Using It
+
+When importing data to your knowledge base or configuring file uploads in your app, check `Enhanced PDF Parsing`. PDFs will then be parsed using the Doc2x service.
+
+### Using Marker for PDF Parsing
+
+[View the Marker integration tutorial](/docs/introduction/development/custom-models/marker)
diff --git a/document/content/docs/introduction/development/custom-models/bge-rerank.en.mdx b/document/content/docs/introduction/development/custom-models/bge-rerank.en.mdx
new file mode 100644
index 0000000000..4425be3b6b
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/bge-rerank.en.mdx
@@ -0,0 +1,137 @@
+---
+title: Integrating bge-rerank Reranking Model
+description: Integrating bge-rerank reranking model with FastGPT
+---
+
+## Recommended Configuration by Model
+
+| Model Name | RAM | VRAM | Disk Space | Start Command |
+|------|---------|---------|----------|--------------------------|
+| bge-reranker-base | >=4GB | >=4GB | >=8GB | python app.py |
+| bge-reranker-large | >=8GB | >=8GB | >=8GB | python app.py |
+| bge-reranker-v2-m3 | >=8GB | >=8GB | >=8GB | python app.py |
+
+
+## Source Code Deployment
+
+### 1. Environment Setup
+
+- Python 3.9 or 3.10
+- CUDA 11.7
+- Network access to download models
+
+### 2. Download Code
+
+Code repositories for the 3 models:
+
+1. [https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-base](https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-base)
+2. [https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-large](https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-large)
+3. [https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-v2-m3](https://github.com/labring/FastGPT/tree/main/plugins/model/rerank-bge/bge-reranker-v2-m3)
+
+### 3. Install Dependencies
+
+```sh
+pip install -r requirements.txt
+```
+
+### 4. Download Models
+
+HuggingFace repositories for the 3 models:
+
+1. [https://huggingface.co/BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base)
+2. [https://huggingface.co/BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large)
+3. [https://huggingface.co/BAAI/bge-reranker-v2-m3](https://huggingface.co/BAAI/bge-reranker-v2-m3)
+
+Clone the model into the corresponding code directory. Directory structure:
+
+```
+bge-reranker-base/
+app.py
+Dockerfile
+requirements.txt
+```
+
+### 5. Run
+
+```bash
+python app.py
+```
+
+On successful startup, you should see an address like this:
+
+
+
+> `http://0.0.0.0:6006` is the connection address.
+
+## Docker Deployment
+
+**Image names:**
+
+1. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1 (4 GB+)
+2. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-large:v0.1 (5 GB+)
+3. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-v2-m3:v0.1 (5 GB+)
+
+**Port**
+
+6006
+
+**Environment Variables**
+
+```
+ACCESS_TOKEN=your_access_token (used in request header: Authorization: Bearer ${ACCESS_TOKEN})
+```
+
+**Run Command Example**
+
+```sh
+# auth token set to mytoken
+docker run -d --name reranker -p 6006:6006 -e ACCESS_TOKEN=mytoken --gpus all registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1
+```
+
+**docker-compose.yml Example**
+```
+version: "3"
+services:
+ reranker:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1
+ container_name: reranker
+ # GPU runtime. If the host doesn't have GPU drivers installed, comment out the deploy section.
+ deploy:
+ resources:
+ reservations:
+ devices:
+ - driver: nvidia
+ count: all
+ capabilities: [gpu]
+ ports:
+ - 6006:6006
+ environment:
+ - ACCESS_TOKEN=mytoken
+
+```
+## Integrate with FastGPT
+
+1. Open the FastGPT model configuration and add a new reranking model.
+2. Fill in the model configuration form: set the Model ID to `bge-reranker-base` and the address to `{{host}}/v1/rerank`, where host is your deployed domain or IP:Port.
+
+
+
+## FAQ
+
+### 403 Error
+
+The custom request token in FastGPT does not match the ACCESS_TOKEN environment variable.
+
+### Docker reports `Bus error (core dumped)`
+
+Try adding the `shm_size` option to your `docker-compose.yml` to increase the shared memory size in the container.
+
+```
+...
+services:
+ reranker:
+ ...
+ container_name: reranker
+ shm_size: '2gb'
+ ...
+```
diff --git a/document/content/docs/introduction/development/custom-models/chatglm2-m3e.en.mdx b/document/content/docs/introduction/development/custom-models/chatglm2-m3e.en.mdx
new file mode 100644
index 0000000000..3291566f71
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/chatglm2-m3e.en.mdx
@@ -0,0 +1,116 @@
+---
+title: Integrating ChatGLM2 and M3E Models
+description: Integrating private ChatGLM2 and m3e-large models with FastGPT
+---
+
+## Introduction
+
+FastGPT uses OpenAI's LLM and embedding models by default. For private deployment, you can use ChatGLM2 and m3e-large as replacements. The following method was contributed by community user @不做了睡大觉. This image bundles both M3E-Large and ChatGLM2-6B models, ready to use out of the box.
+
+## Deploy the Image
+
+- Image: `stawky/chatglm2-m3e:latest`
+- China mirror: `registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/chatglm2-m3e:latest`
+- Port: 6006
+
+```
+# Set the security token (used as the channel key in OneAPI)
+Default: sk-aaabbbcccdddeeefffggghhhiiijjjkkk
+You can also set it via the environment variable: sk-key. Refer to Docker documentation for how to pass environment variables.
+```
+
+## Connect to OneAPI
+
+Documentation: [One API](/docs/introduction/development/modelconfig/one-api/)
+
+Add a channel for chatglm2 and m3e-large respectively, with the following parameters:
+
+
+
+Here, m3e is used as the embedding model and chatglm2 as the language model.
+
+## Test
+
+curl examples:
+
+```bash
+curl --location --request POST 'https://domain/v1/embeddings' \
+--header 'Authorization: Bearer sk-aaabbbcccdddeeefffggghhhiiijjjkkk' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "m3e",
+ "input": ["What is laf"]
+}'
+```
+
+```bash
+curl --location --request POST 'https://domain/v1/chat/completions' \
+--header 'Authorization: Bearer sk-aaabbbcccdddeeefffggghhhiiijjjkkk' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "chatglm2",
+ "messages": [{"role": "user", "content": "Hello!"}]
+}'
+```
+
+Set Authorization to sk-aaabbbcccdddeeefffggghhhiiijjjkkk. The model field should match the custom model name you entered in One API.
+
+## Integrate with FastGPT
+
+Edit the config.json file. Add chatglm2 to `llmModels` and M3E to `vectorModels`:
+
+```json
+"llmModels": [
+ // Other chat models
+ {
+ "model": "chatglm2",
+ "name": "chatglm2",
+ "maxToken": 8000,
+ "price": 0,
+ "quoteMaxToken": 4000,
+ "maxTemperature": 1.2,
+ "defaultSystemChatPrompt": ""
+ }
+],
+"vectorModels": [
+ {
+ "model": "text-embedding-ada-002",
+ "name": "Embedding-2",
+ "price": 0.2,
+ "defaultToken": 500,
+ "maxToken": 3000
+ },
+ {
+ "model": "m3e",
+ "name": "M3E (for testing)",
+ "price": 0.1,
+ "defaultToken": 500,
+ "maxToken": 1800
+ }
+],
+```
+
+## Usage
+
+**M3E model:**
+
+1. Select the M3E model when creating a Knowledge Base.
+
+ Note: once selected, the embedding model for the Knowledge Base cannot be changed.
+
+ 
+
+2. Import data
+3. Test search
+
+ 
+
+4. Bind the Knowledge Base to an app
+
+ Note: an app can only bind Knowledge Bases that use the same embedding model -- cross-model binding is not supported. You may also need to adjust the similarity threshold, as different embedding models produce different similarity (distance) scores. Test and tune accordingly.
+
+ 
+
+**ChatGLM2 model:**
+
+Simply select chatglm2 as the model.
diff --git a/document/content/docs/introduction/development/custom-models/chatglm2.en.mdx b/document/content/docs/introduction/development/custom-models/chatglm2.en.mdx
new file mode 100644
index 0000000000..97566e38e7
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/chatglm2.en.mdx
@@ -0,0 +1,120 @@
+---
+title: Integrating ChatGLM2-6B
+description: Integrating the private ChatGLM2-6B model with FastGPT
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Introduction
+
+FastGPT lets you use your own OpenAI API KEY to quickly call OpenAI APIs. It currently integrates GPT-3.5, GPT-4, and embedding models for building Knowledge Bases. However, for data security reasons, you may not want to send all data to cloud-based LLMs.
+
+So how do you connect a private model to FastGPT? This guide walks through integrating Tsinghua's ChatGLM2 as an example.
+
+## ChatGLM2-6B Overview
+
+ChatGLM2-6B is the second-generation version of the open-source bilingual (Chinese-English) chat model ChatGLM-6B. For details, see the [ChatGLM2-6B project page](https://github.com/THUDM/ChatGLM2-6B).
+
+
+Note: ChatGLM2-6B weights are fully open for academic research. Commercial use requires official written permission. This tutorial only demonstrates one integration method and does not grant any license.
+
+
+## Recommended Configuration
+
+According to official data, generating 8192 tokens requires 12.8GB VRAM at FP16, 8.1GB at int8, and 5.1GB at int4. Quantization slightly affects performance, but not significantly.
+
+Recommended configurations:
+
+
+| Type | RAM | VRAM | Disk Space | Start Command |
+|------|---------|---------|----------|--------------------------|
+| fp16 | >=16GB | >=16GB | >=25GB | python openai_api.py 16 |
+| int8 | >=16GB | >=9GB | >=25GB | python openai_api.py 8 |
+| int4 | >=16GB | >=6GB | >=25GB | python openai_api.py 4 |
+
+
+## Deployment
+
+### Environment Requirements
+
+- Python 3.8.10
+- CUDA 11.8
+- Network access to download models
+
+### Source Code Deployment
+
+1. Set up the environment as described above;
+2. Download the [Python file](https://github.com/labring/FastGPT/blob/main/plugins/model/llm-ChatGLM2/openai_api.py)
+3. Run `pip install -r requirements.txt`;
+4. Open the Python file and configure the token in the `verify_token` method -- this adds a layer of authentication to prevent unauthorized access;
+5. Run `python openai_api.py --model_name 16`. Choose the number based on the configuration table above.
+
+Wait for the model to download and load. If you encounter errors, try asking GPT for help.
+
+On successful startup, you should see an address like this:
+
+
+
+> `http://0.0.0.0:6006` is the connection address.
+
+### Docker Deployment
+
+**Image and Port**
+
++ Image: `stawky/chatglm2:latest`
++ China mirror: `registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/chatglm2:latest`
++ Port: 6006
+
+```
+# Set the security token (used as the channel key in OneAPI)
+Default: sk-aaabbbcccdddeeefffggghhhiiijjjkkk
+You can also set it via the environment variable: sk-key. Refer to Docker documentation for how to pass environment variables.
+```
+
+## Connect to One API
+
+Add a channel for chatglm2 with the following parameters:
+
+
+
+Here, chatglm2 is used as the language model.
+
+## Test
+
+curl example:
+
+```bash
+curl --location --request POST 'https://domain/v1/chat/completions' \
+--header 'Authorization: Bearer sk-aaabbbcccdddeeefffggghhhiiijjjkkk' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "chatglm2",
+ "messages": [{"role": "user", "content": "Hello!"}]
+}'
+```
+
+Set Authorization to sk-aaabbbcccdddeeefffggghhhiiijjjkkk. The model field should match the custom model name you entered in One API.
+
+## Integrate with FastGPT
+
+Edit the config.json file and add chatglm2 to `llmModels`:
+
+```json
+"llmModels": [
+ // Existing models
+ {
+ "model": "chatglm2",
+ "name": "chatglm2",
+ "maxContext": 4000,
+ "maxResponse": 4000,
+ "quoteMaxToken": 2000,
+ "maxTemperature": 1,
+ "vision": false,
+ "defaultSystemChatPrompt": ""
+ }
+]
+```
+
+## Usage
+
+Simply select chatglm2 as the model.
diff --git a/document/content/docs/introduction/development/custom-models/m3e.en.mdx b/document/content/docs/introduction/development/custom-models/m3e.en.mdx
new file mode 100644
index 0000000000..fdc1784de9
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/m3e.en.mdx
@@ -0,0 +1,85 @@
+---
+title: Integrating M3E Embedding Model
+description: Integrating the private M3E embedding model with FastGPT
+---
+
+## Introduction
+
+FastGPT uses OpenAI's embedding model by default. For private deployment, you can replace it with the M3E embedding model. M3E is a lightweight model with low resource requirements -- it can even run on CPU. The following tutorial is based on an image provided by community contributor "睡大觉".
+
+## Deploy the Image
+
+Image: `stawky/m3e-large-api:latest`
+China mirror: `registry.cn-hangzhou.aliyuncs.com/fastgpt_docker/m3e-large-api:latest`
+Port: 6008
+Environment variables:
+
+```
+# Set the security token (used as the channel key in OneAPI)
+Default: sk-aaabbbcccdddeeefffggghhhiiijjjkkk
+You can also set it via the environment variable: sk-key. Refer to Docker documentation for how to pass environment variables.
+```
+
+## Connect to One API
+
+Add a channel with the following parameters:
+
+
+
+## Test
+
+curl example:
+
+```bash
+curl --location --request POST 'https://domain/v1/embeddings' \
+--header 'Authorization: Bearer xxxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "m3e",
+ "input": ["What is laf"]
+}'
+```
+
+Set Authorization to your sk-key. The model field should match the custom model name you entered in One API.
+
+## Integrate with FastGPT
+
+Edit the config.json file and add the M3E model to `vectorModels`:
+
+```json
+"vectorModels": [
+ {
+ "model": "text-embedding-ada-002",
+ "name": "Embedding-2",
+ "price": 0.2,
+ "defaultToken": 500,
+ "maxToken": 3000
+ },
+ {
+ "model": "m3e",
+ "name": "M3E (for testing)",
+ "price": 0.1,
+ "defaultToken": 500,
+ "maxToken": 1800
+ }
+]
+```
+
+## Usage
+
+1. Select the M3E model when creating a Knowledge Base.
+
+ Note: once selected, the embedding model for the Knowledge Base cannot be changed.
+
+ 
+
+2. Import data
+3. Test search
+
+ 
+
+4. Bind the Knowledge Base to an app
+
+ Note: an app can only bind Knowledge Bases that use the same embedding model -- cross-model binding is not supported. You may also need to adjust the similarity threshold, as different embedding models produce different similarity (distance) scores. Test and tune accordingly.
+
+ 
diff --git a/document/content/docs/introduction/development/custom-models/marker.en.mdx b/document/content/docs/introduction/development/custom-models/marker.en.mdx
new file mode 100644
index 0000000000..f86f855342
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/marker.en.mdx
@@ -0,0 +1,99 @@
+---
+title: Integrating Marker PDF Parsing
+description: Use Marker to parse PDF documents with image extraction and layout recognition
+---
+
+## Background
+
+PDF is a relatively complex file format. FastGPT's built-in PDF parser relies on the pdfjs library, which uses logical parsing and cannot effectively handle complex PDF files. When parsing PDFs containing images, tables, formulas, or other non-plain-text content, the results are often poor.
+
+There are several PDF parsing solutions available. [Marker](https://github.com/VikParuchuri/marker) uses the Surya model for vision-based parsing, effectively extracting images, tables, formulas, and other complex content.
+
+Starting from `FastGPT v4.9.0`, community edition users can add the `systemEnv.customPdfParse` configuration in `config.json` to use Marker for PDF parsing. Commercial edition users can configure this directly in the Admin panel via the form. You need to pull the latest Marker image, as the API format has changed.
+
+## Tutorial
+
+### 1. Install Marker
+
+Refer to the [Marker installation guide](https://github.com/labring/FastGPT/tree/main/plugins/model/pdf-marker) to install the Marker model. The bundled API is already compatible with FastGPT's custom parsing service.
+
+Quick Docker installation:
+
+```dockerfile
+docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
+docker run --gpus all -itd -p 7231:7232 --name model_pdf_v2 -e PROCESSES_PER_GPU="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.2
+```
+
+### 2. Add FastGPT Configuration
+
+```json
+{
+ xxx
+ "systemEnv": {
+ xxx
+ "customPdfParse": {
+ "url": "http://xxxx.com/v2/parse/file", // Custom PDF parsing service URL for Marker v0.2
+ "key": "", // Custom PDF parsing service key
+ "doc2xKey": "", // doc2x service key
+ "price": 0 // PDF parsing service price
+ }
+ }
+}
+```
+
+Restart the service after making changes.
+
+### 3. Test
+
+Upload a PDF file through the Knowledge Base and enable the `Enhanced PDF Parsing` option.
+
+
+
+After uploading, you should see the following logs (LOG_LEVEL must be set to info or debug):
+
+```
+[Info] 2024-12-05 15:04:42 Parsing files from an external service
+[Info] 2024-12-05 15:07:08 Custom file parsing is complete, time: 1316ms
+```
+
+You'll notice that PDFs parsed by Marker include image links:
+
+
+
+Similarly, in apps you can enable `Enhanced PDF Parsing` in the file upload settings.
+
+
+
+## Results
+
+Using Tsinghua's [ChatDev Communicative Agents for Software Develop.pdf](https://arxiv.org/abs/2307.07924) as an example:
+
+| | | |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+|  |  |  |
+|  |  |  |
+
+The top row shows chunked results; the bottom row shows the original PDF. Images, formulas, and tables are all extracted effectively.
+
+Note that [Marker](https://github.com/VikParuchuri/marker) is licensed under `GPL-3.0 license`. Please ensure compliance with the license when using it.
+
+## Legacy Marker Usage
+
+For FastGPT versions before V4.9.0, you can use the following method for Marker parsing.
+
+Install and run the Marker service:
+
+```dockerfile
+docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
+docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 -e PROCESSES_PER_GPU="2" crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:v0.1
+```
+
+Then modify the FastGPT environment variables:
+
+```
+CUSTOM_READ_FILE_URL=http://xxxx.com/v1/parse/file
+CUSTOM_READ_FILE_EXTENSION=pdf
+```
+
+- CUSTOM_READ_FILE_URL - The custom parsing service URL. Replace the host with your parsing service address; the path must remain unchanged.
+- CUSTOM_READ_FILE_EXTENSION - Supported file extensions. Use commas to separate multiple file types.
diff --git a/document/content/docs/introduction/development/custom-models/meta.en.json b/document/content/docs/introduction/development/custom-models/meta.en.json
new file mode 100644
index 0000000000..36a55a1d1c
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/meta.en.json
@@ -0,0 +1,13 @@
+{
+ "title": "Local Model Usage",
+ "pages": [
+ "marker",
+ "mineru",
+ "xinference",
+ "bge-rerank",
+ "chatglm2",
+ "m3e",
+ "chatglm2-m3e",
+ "ollama"
+ ]
+}
diff --git a/document/content/docs/introduction/development/custom-models/mineru.en.mdx b/document/content/docs/introduction/development/custom-models/mineru.en.mdx
new file mode 100644
index 0000000000..0954becd86
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/mineru.en.mdx
@@ -0,0 +1,82 @@
+---
+title: Integrating MinerU PDF Parsing
+description: Use MinerU to parse PDF documents with image extraction, layout recognition, table recognition, and formula recognition
+---
+
+## Background
+
+PDF is a relatively complex file format. FastGPT's built-in PDF parser relies on the pdfjs library, which uses logical parsing and cannot effectively handle complex PDF files. When parsing PDFs containing images, tables, formulas, or other non-plain-text content, the results are often poor.
+
+There are several PDF parsing solutions available. [MinerU](https://github.com/opendatalab/MinerU) uses YOLO, PaddleOCR, and table recognition models for vision-based parsing, effectively extracting images, tables, formulas, and other complex content.
+
+Community edition users can add the `systemEnv.customPdfParse` configuration in `config.json` to use MinerU for PDF parsing. Commercial edition users can configure this directly in the Admin panel via the form -- details are covered in the tutorial below.
+
+## Tutorial
+
+Hardware requirements: 16GB+ GPU VRAM, minimum 16GB+ RAM (32GB+ recommended). See the [official page](https://github.com/opendatalab/MinerU) for other requirements.
+
+### 1. Install MinerU
+
+Quick Docker installation:
+
+Pull the fastgpt-mineru image --> Create and start the parsing service container --> Add the deployed URL to the FastGPT configuration file
+
+```dockerfile
+docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/fastgpt_ck/mineru:v1
+docker run --gpus all -itd -p 7231:8001 --name mode_pdf_minerU crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/fastgpt_ck/mineru:v1
+```
+This MinerU integration uses pipeline mode with built-in parallelization inside the Docker container. It creates multiple processes based on the number of GPUs to handle uploaded PDFs concurrently.
+
+### 2. Add FastGPT Configuration
+
+```json
+{
+ xxx
+ "systemEnv": {
+ xxx
+ "customPdfParse": {
+ "url": "http://xxxx.com/v2/parse/file", // Custom PDF parsing service URL for MinerU
+ "key": "", // Custom PDF parsing service key
+ "doc2xKey": "", // doc2x service key
+ "price": 0 // PDF parsing service price
+ }
+ }
+}
+```
+
+For the commercial edition, configure as shown below:
+
+
+
+**Note:** Services added via the configuration file require a restart to take effect.
+
+### 3. Test
+
+Upload a PDF file through the Knowledge Base and enable the `Enhanced PDF Parsing` option.
+
+
+
+After uploading, you should see the following logs (LOG_LEVEL must be set to info or debug):
+
+```
+[Info] 2024-12-05 15:04:42 Parsing files from an external service
+[Info] 2024-12-05 15:07:08 Custom file parsing is complete, time: 1316ms
+```
+
+
+Similarly, in apps you can enable `Enhanced PDF Parsing` in the file upload settings.
+
+
+
+## Results
+
+Using Tsinghua's [ChatDev Communicative Agents for Software Develop.pdf](https://arxiv.org/abs/2307.07924) as an example:
+
+| | | |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+|  |  |  |
+|  |  |  |
+
+The top row shows chunked results; the bottom row shows the original PDF. Images, formulas, and OCR handwriting are all extracted effectively.
+
+Note that [MinerU](https://github.com/opendatalab/MinerU) is licensed under `GPL-3.0 license`. Please ensure compliance with the license when using it.
diff --git a/document/content/docs/introduction/development/custom-models/ollama.en.mdx b/document/content/docs/introduction/development/custom-models/ollama.en.mdx
new file mode 100644
index 0000000000..b192712cd6
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/ollama.en.mdx
@@ -0,0 +1,180 @@
+---
+title: Integrating Local Models with Ollama
+description: Deploy your own models using Ollama
+---
+
+[Ollama](https://ollama.com/) is an open-source AI model deployment tool focused on simplifying the deployment and usage of large language models. It supports one-click download and running of various LLMs.
+
+## Installing Ollama
+
+Ollama supports multiple installation methods, but Docker is recommended. If you install Ollama directly on your host machine, you'll need to figure out how to let the FastGPT Docker container access Ollama on the host, which can be tricky.
+
+### Docker Installation (Recommended)
+
+Use Ollama's official Docker image for one-click installation and startup (make sure Docker is installed on your machine):
+
+```bash
+docker pull ollama/ollama
+docker run --rm -d --name ollama -p 11434:11434 ollama/ollama
+```
+
+If your FastGPT is deployed in Docker, make sure the Ollama container is on the same network as FastGPT. Otherwise, FastGPT may not be able to access it:
+
+```bash
+docker run --rm -d --name ollama --network (your FastGPT container network) -p 11434:11434 ollama/ollama
+```
+
+### Host Installation
+
+If you prefer not to use Docker, you can install directly on the host machine.
+
+#### MacOS
+
+If you're on macOS with Homebrew installed:
+
+```bash
+brew install ollama
+ollama serve # Start the service after installation
+```
+
+#### Linux
+
+On Linux, you can use a package manager. For Ubuntu:
+
+```bash
+curl https://ollama.com/install.sh | sh # Downloads and runs the official install script
+ollama serve # Start the service after installation
+```
+
+#### Windows
+
+On Windows, download the installer from the Ollama official website. Run the installer and follow the wizard. After installation, start the service in Command Prompt or PowerShell:
+
+```bash
+ollama serve # After installation, visit http://localhost:11434 in your browser to verify Ollama is running
+```
+
+#### Additional Notes
+
+If you installed Ollama as a host application (not via Docker), make sure Ollama listens on 0.0.0.0.
+
+##### 1. Linux
+
+If Ollama runs as a systemd service, edit the service file with `sudo systemctl edit ollama.service`. Add `Environment="OLLAMA_HOST=0.0.0.0"` under the [Service] section. Save and exit, then run `sudo systemctl daemon-reload` and `sudo systemctl restart ollama` to apply.
+
+##### 2. MacOS
+
+Open a terminal and run `launchctl setenv ollama_host "0.0.0.0"`, then restart the Ollama application.
+
+##### 3. Windows
+
+Open "Edit system environment variables" from the Start menu or search bar. In "System Properties", click "Environment Variables". Under "System variables", click "New" and create a variable named OLLAMA_HOST with value 0.0.0.0. Click "OK" to save, then restart Ollama from the Start menu.
+
+### Pull Model Images
+
+After installing Ollama, no models are available locally -- you need to pull them:
+
+```bash
+# For Docker deployment, enter the container first: docker exec -it [Ollama container name] /bin/sh
+ollama pull [model name]
+```
+
+
+
+### Test Communication
+
+After installation, verify connectivity by entering the FastGPT container and trying to reach Ollama:
+
+```bash
+docker exec -it [FastGPT container name] /bin/sh
+curl http://XXX.XXX.XXX.XXX:11434 # Container: "http://[container name]:[port]", Host: "http://[host IP]:[port]" (host IP cannot be localhost)
+```
+
+If you see that the Ollama service is running, communication is working.
+
+## Integrating Ollama with FastGPT
+
+### 1. Check Available Models
+
+First, check which models Ollama has:
+
+```bash
+# For Docker-deployed Ollama: docker exec -it [Ollama container name] /bin/sh
+ollama ls
+```
+
+
+
+### 2. AI Proxy Integration
+
+If you're using FastGPT's default configuration from [here](/docs/introduction/development/docker.md), AI Proxy is enabled by default.
+
+
+
+Make sure your FastGPT can access the Ollama container. If not, refer to the [installation section](#installing-ollama) above -- check whether the host isn't listening on 0.0.0.0 or the containers aren't on the same network.
+
+
+
+In FastGPT, go to Account -> Model Providers -> Model Configuration -> Add Model. Make sure the model ID matches the model name in OneAPI. See details [here](/docs/introduction/development/modelConfig/intro.md).
+
+
+
+
+
+Run FastGPT, then go to Account -> Model Providers -> Model Channels -> Add Channel. Select Ollama as the channel type, add your pulled model, and fill in the proxy address. For container-deployed Ollama, the address is http://address:port. Note: container deployment uses "http://[container name]:[port]", host installation uses "http://[host IP]:[port]" (host IP cannot be localhost).
+
+
+
+Create an app in the workspace and select the model you added. The model name shown is the alias you set. Note: the same model cannot be added multiple times -- the system uses the alias from the most recent addition.
+
+
+
+### 3. OneAPI Integration
+
+If you want to use OneAPI, pull the OneAPI image and run it on the same network as FastGPT:
+
+```bash
+# Pull the OneAPI image
+docker pull intel/oneapi-hpckit
+
+# Run the container on the FastGPT network
+docker run -it --network [FastGPT network] --name container_name intel/oneapi-hpckit /bin/bash
+```
+
+In the OneAPI page, add a new channel with type Ollama. Enter your Ollama model name (must match exactly), then fill in the Ollama proxy address below -- default is http://address:port, without /v1. Test the channel after adding. This example uses Docker-deployed Ollama; for host-installed Ollama, use http://[host IP]:[port].
+
+
+
+After adding the channel, click Token -> Add Token, fill in the name, and configure as needed.
+
+
+
+Edit the FastGPT docker-compose.yml file: comment out AI Proxy, set OPENAI_BASE_URL to your OneAPI address (default http://address:port/v1 -- /v1 is required), and set KEY to your OneAPI token.
+
+
+
+Then [jump to section 5](#5-model-addition-and-usage) to add and use models.
+
+### 4. Direct Integration
+
+If you don't want to use AI Proxy or OneAPI, you can connect directly. Edit the FastGPT docker-compose.yml: comment out AI Proxy code, set OPENAI_BASE_URL to your Ollama address (default http://address:port/v1 -- /v1 is required), and set KEY to any value (Ollama has no authentication by default; if you've enabled it, use the correct key). Everything else is the same as the OneAPI approach -- just add your model in FastGPT. This example uses Docker-deployed Ollama; for host-installed Ollama, use http://[host IP]:[port].
+
+
+
+After completing the setup, [click here](#5-model-addition-and-usage) to add and use models.
+
+### 5. Model Addition and Usage
+
+In FastGPT, go to Account -> Model Providers -> Model Configuration -> Add Model. Make sure the model ID matches the model name in OneAPI.
+
+
+
+
+
+Create an app in the workspace and select the model you added. The model name shown is the alias you set. Note: the same model cannot be added multiple times -- the system uses the alias from the most recent addition.
+
+
+
+### 6. Additional Notes
+
+For the Ollama proxy addresses above: host-installed Ollama uses "http://[host IP]:[port]", container-deployed Ollama uses "http://[container name]:[port]".
diff --git a/document/content/docs/introduction/development/custom-models/xinference.en.mdx b/document/content/docs/introduction/development/custom-models/xinference.en.mdx
new file mode 100644
index 0000000000..6263741680
--- /dev/null
+++ b/document/content/docs/introduction/development/custom-models/xinference.en.mdx
@@ -0,0 +1,158 @@
+---
+title: Integrating Local Models with Xinference
+description: One-stop local LLM private deployment
+---
+
+[Xinference](https://github.com/xorbitsai/inference) is an open-source model inference platform. Beyond LLMs, it can also deploy Embedding and ReRank models, which are critical for enterprise-grade RAG. Xinference also provides advanced features like Function Calling and supports distributed deployment, meaning it can scale horizontally as your application usage grows.
+
+## Installing Xinference
+
+Xinference supports multiple inference engines as backends for different deployment scenarios. Below we introduce these backends by use case.
+
+### 1. Server
+
+If you're deploying LLMs on a Linux or Windows server, you can choose Transformers or vLLM as Xinference's inference backend:
+
+- [Transformers](https://huggingface.co/docs/transformers/index): By integrating Hugging Face's Transformers library, Xinference can quickly adopt the most cutting-edge NLP models, including LLMs.
+- [vLLM](https://vllm.ai/): An open-source library developed by UC Berkeley for efficiently serving LLMs. It introduces the PagedAttention algorithm for improved memory management of attention keys and values. Throughput can reach 24x that of Transformers, making vLLM suitable for production environments with high-concurrency access.
+
+If your server has an NVIDIA GPU, refer to [this article for CUDA installation instructions](https://xorbits.cn/blogs/langchain-streamlit-doc-chat) to maximize GPU acceleration with Xinference.
+
+#### Docker Deployment
+
+Use Xinference's official Docker image for one-click installation and startup (make sure Docker is installed):
+
+```bash
+docker run -p 9997:9997 --gpus all xprobe/xinference:latest xinference-local -H 0.0.0.0
+```
+
+#### Direct Deployment
+
+First, prepare a Python 3.9+ environment. We recommend installing conda first, then creating a Python 3.11 environment:
+
+```bash
+conda create --name py311 python=3.11
+conda activate py311
+```
+
+Install Xinference with Transformers and vLLM as inference backends:
+
+```bash
+pip install "xinference[transformers]"
+pip install "xinference[vllm]"
+pip install "xinference[transformers,vllm]" # Install both
+```
+
+PyPI automatically installs PyTorch with Transformers and vLLM, but the auto-installed CUDA version may not match your environment. If so, manually install per PyTorch's [installation guide](https://pytorch.org/get-started/locally/).
+
+Start the Xinference service:
+
+```bash
+xinference-local -H 0.0.0.0
+```
+
+Xinference starts locally on port 9997 by default. With the `-H 0.0.0.0` parameter, non-local clients can access the service via the machine's IP address.
+
+### 2. Personal Devices
+
+To deploy LLMs on your MacBook or personal computer, we recommend CTransformers as Xinference's inference backend. CTransformers is a C++ implementation of Transformers using GGML.
+
+[GGML](https://ggml.ai/) is a C++ library that enables LLMs to [run on consumer hardware](https://github.com/ggerganov/llama.cpp/discussions/205). Its key feature is model quantization -- reducing weight precision to lower resource requirements. For example, representing a high-precision float (like 0.0001) requires more space than a low-precision one (like 0.1). Since LLMs must be loaded into memory for inference, you need sufficient disk space for storage and enough RAM for execution. GGML supports many quantization strategies, each offering different efficiency-performance trade-offs.
+
+Install CTransformers as Xinference's backend:
+
+```bash
+pip install xinference
+pip install ctransformers
+```
+
+Since GGML is a C++ library, Xinference uses `llama-cpp-python` for language bindings. Different hardware platforms require different compilation parameters:
+
+- Apple Metal (MPS): `CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python`
+- Nvidia GPU: `CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python`
+- AMD GPU: `CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python`
+
+After installation, run `xinference-local` to start the Xinference service on your Mac.
+
+## Creating and Deploying Models (Qwen-14B Example)
+
+### 1. Launch via WebUI
+
+After starting Xinference, open `http://127.0.0.1:9997` in your browser to access the Xinference Web UI.
+
+Go to the "Launch Model" tab, search for qwen-chat, select the launch parameters, then click the rocket button in the lower left of the model card to deploy. The default Model UID is qwen-chat (used to access the model later).
+
+
+
+On first launch, Xinference downloads model parameters from HuggingFace, which takes a few minutes. Model files are cached locally for subsequent launches. Xinference also supports downloading from other sources like [modelscope](https://inference.readthedocs.io/en/latest/models/sources/sources.html).
+
+### 2. Launch via Command Line
+
+You can also use Xinference's CLI to launch models. The default Model UID is qwen-chat.
+
+```bash
+xinference launch -n qwen-chat -s 14 -f pytorch
+```
+
+Beyond WebUI and CLI, Xinference also provides Python SDK and RESTful API. For more details, see the [Xinference documentation](https://inference.readthedocs.io/en/latest/getting_started/index.html).
+
+## Integrate Local Models with One API
+
+For One API deployment and setup, refer to [here](/docs/introduction/development/modelconfig/one-api/).
+
+Add a channel for qwen1.5-chat. Set the Base URL to the Xinference service endpoint and register qwen-chat (the model's UID).
+
+
+
+Test with this command:
+
+```bash
+curl --location --request POST 'https://[oneapi_url]/v1/chat/completions' \
+--header 'Authorization: Bearer [oneapi_token]' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "qwen-chat",
+ "messages": [{"role": "user", "content": "Hello!"}]
+}'
+```
+
+Replace [oneapi_url] with your One API address and [oneapi_token] with your One API token. The model field should match the custom model name you entered in One API.
+
+## Integrate Local Models with FastGPT
+
+Add the qwen-chat model to the `llmModels` section of FastGPT's `config.json`:
+
+```json
+...
+ "llmModels": [
+ {
+ "model": "qwen-chat", // Model name (matches the channel model name in OneAPI)
+ "name": "Qwen", // Display name
+ "avatar": "/imgs/model/Qwen.svg", // Model logo
+ "maxContext": 125000, // Max context length
+ "maxResponse": 4000, // Max response length
+ "quoteMaxToken": 120000, // Max quote content tokens
+ "maxTemperature": 1.2, // Max temperature
+ "charsPointsPrice": 0, // n points/1k tokens (Commercial Edition)
+ "censor": false, // Enable content moderation (Commercial Edition)
+ "vision": true, // Supports image input
+ "datasetProcess": true, // Use as Knowledge Base processing model (QA). At least one model must be true, or Knowledge Base will error
+ "usedInClassify": true, // Use for question classification (at least one must be true)
+ "usedInExtractFields": true, // Use for content extraction (at least one must be true)
+ "usedInToolCall": true, // Use for tool calling (at least one must be true)
+ "toolChoice": true, // Supports tool choice (used in classification, extraction, tool calling)
+ "functionCall": false, // Supports function calling (used in classification, extraction, tool calling. toolChoice takes priority; if false, falls back to functionCall; if still false, uses prompt mode)
+ "customCQPrompt": "", // Custom classification prompt (for models without tool/function calling support)
+ "customExtractPrompt": "", // Custom content extraction prompt
+ "defaultSystemChatPrompt": "", // Default system prompt for conversations
+ "defaultConfig": {} // Default config sent with API requests (e.g., GLM4's top_p)
+ }
+ ],
+...
+```
+
+Restart FastGPT to select the Qwen model in app configuration:
+
+## 
+
+- Reference: [FastGPT + Xinference: One-Stop Local LLM Private Deployment and Application Development](https://xorbits.cn/blogs/fastgpt-weather-chat)
diff --git a/document/content/docs/introduction/development/design/dataset.en.mdx b/document/content/docs/introduction/development/design/dataset.en.mdx
new file mode 100644
index 0000000000..79835dc35a
--- /dev/null
+++ b/document/content/docs/introduction/development/design/dataset.en.mdx
@@ -0,0 +1,21 @@
+---
+title: Dataset Design
+description: FastGPT dataset file and data design
+---
+
+## Relationship Between Files and Data
+
+In FastGPT, files are stored using MongoDB's GridFS, while the actual data is stored in PostgreSQL. Each row in PG has a `file_id` column that references the corresponding file. For backward compatibility and to support manual input and annotated data, `file_id` has some special values:
+
+- manual: Manually entered data
+- mark: Manually annotated data
+
+Note: `file_id` is only written at data insertion time and cannot be modified afterward.
+
+## File Import Process
+
+1. Upload the file to MongoDB GridFS and obtain a `file_id`. The file is marked as `unused` at this point.
+2. The browser parses the file to extract text and chunks.
+3. Each chunk is tagged with the `file_id`.
+4. Click upload: the file status changes to `used`, and the data is pushed to the mongo `training` collection to await processing.
+5. The training thread pulls data from mongo, generates vectors, and inserts them into PG.
diff --git a/document/content/docs/introduction/development/design/design_plugin.en.mdx b/document/content/docs/introduction/development/design/design_plugin.en.mdx
new file mode 100644
index 0000000000..4ed8407cbf
--- /dev/null
+++ b/document/content/docs/introduction/development/design/design_plugin.en.mdx
@@ -0,0 +1,82 @@
+---
+title: System Plugin Design
+description: FastGPT system plugin design
+---
+
+## Background
+
+Previously, all FastGPT features lived within the Next.js framework, organized as a Monorepo. System plugins existed as a sub-repo under FastGPT/packages/plugin.
+
+As the user base grew, this approach revealed several limitations:
+
+1. Although FastGPT releases weekly, system plugins had to ship alongside FastGPT, severely limiting plugin iteration speed.
+2. Community contributors who wanted to add plugins had to run the entire FastGPT application and submit PRs directly to the main repo.
+3. Users who wanted custom plugins had to maintain a FastGPT fork and manually handle updates and merges, increasing development complexity.
+4. Due to Next.js/webpack limitations, plugins couldn't be mounted at runtime -- no hot-swapping.
+
+## Design
+
+We decided to extract system plugins into a separate repository:
+
+[FastGPT-plugin](https://github.com/labring/fastgpt-plugin)
+
+Key goals of the split:
+1. Decoupling and modularization: not just system tools, but also other plugin types like Knowledge Base plugins, RAG, etc. can be hot-loaded modules.
+2. Independent versioning: FastGPT-plugin can release more frequently than FastGPT, and hot-swapping enables plugin updates without a full release.
+3. Lower development complexity: contributors only need to run the debug suite provided in FastGPT-plugin, without setting up the full FastGPT environment.
+4. Plugin marketplace: enables a future marketplace where users can publish and discover plugins.
+
+## Technology Stack
+
+1. ts-rest as the RPC framework, with an SDK for the FastGPT main project to consume.
+2. zod for runtime type validation.
+3. bun for bundling -- each tool compiles into a single `.pkg` file for hot-swapping.
+
+## Project Structure
+
+- **modules**
+ - **tool** FastGPT system tools
+ - **api** API implementation logic
+ - **packages** System tool directory (each is a package)
+ - getTime
+ - dalle3
+ - ...
+ - **type** Type definitions
+ - **utils** Utilities
+ - **model** Model presets
+- **scripts** Scripts (build, create new tools)
+- **sdk**: SDK definition for external consumers, published to npm
+- **runtime**: Runtime express service
+- **lib**: Library files with utility functions
+- **test**: Tests
+
+For system tool structure, see [How to Develop System Plugins](/docs/introduction/guide/plugins/dev_system_tool).
+
+## Technical Details
+
+### ts-rest: Contract-Based API with Auto-Generated OpenAPI and Client
+
+[ts-rest](https://ts-rest.com/) is a TypeScript RESTful API framework. After defining a contract, you can write handler logic, auto-generate OpenAPI specs, and export a typed client via createClient.
+
+`tRPC` is a similar TypeScript RPC framework, but it uses a proprietary request format that makes integration with other tools inconvenient. ts-rest is essentially a thin wrapper around RESTful APIs and can directly generate OpenAPI specs.
+
+### Zod Type Validation
+
+We use zod for type validation. Zod provides runtime type checking along with advanced features like parameter transformation and object merging.
+
+### Worker-Based Parallel Execution and Environment Isolation
+
+To prevent plugins from interfering with each other while improving concurrency, FastGPT-plugin uses Worker threads for plugin execution. Each tool runs in an independent Worker when called, providing:
+
+1. Environment isolation: each plugin runs in its own Worker process, so plugins don't affect each other.
+2. Parallel processing: plugins can run concurrently, improving overall performance.
+
+### Bundling with Bun
+
+Bundling each plugin into a single `.pkg` file is a key design decision. This allows plugins to be distributed and loaded directly via network mounting.
+
+## Future Plans
+
+1. Visual development tools: provide visual plugin development and debugging tools to lower the barrier to entry.
+2. Plugin marketplace: a marketplace where developers can publish and share plugins.
+3. More plugin types: beyond system tools, expand to Knowledge Base plugins, model plugins, RAG plugins, and more.
diff --git a/document/content/docs/introduction/development/design/meta.en.json b/document/content/docs/introduction/development/design/meta.en.json
new file mode 100644
index 0000000000..26a4fbfff3
--- /dev/null
+++ b/document/content/docs/introduction/development/design/meta.en.json
@@ -0,0 +1,7 @@
+{
+ "title": "Design Solutions",
+ "pages": [
+ "dataset",
+ "design_plugin"
+ ]
+}
diff --git a/document/content/docs/introduction/development/docker.en.mdx b/document/content/docs/introduction/development/docker.en.mdx
new file mode 100644
index 0000000000..380e21f03b
--- /dev/null
+++ b/document/content/docs/introduction/development/docker.en.mdx
@@ -0,0 +1,409 @@
+---
+title: Deploy with Docker
+description: Quickly deploy FastGPT using Docker Compose
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Prerequisites
+
+1. Basic networking knowledge: ports, firewalls, etc.
+2. Docker and Docker Compose basics
+
+## Deployment Architecture
+
+
+
+
+
+- MongoDB: Stores all data except vectors
+- PostgreSQL/Milvus/Oceanbase/SeekDB: Stores vector data
+- AIProxy: Aggregates various AI APIs with multi-model support (for any model issues, test with OneAPI first)
+
+
+
+## Recommended Specs
+
+### PgVector Version
+
+Very lightweight, suitable for knowledge base indexes under 50 million.
+
+| Environment | Minimum (Single Node) | Recommended |
+| ---------------------------------- | --------------------- | ------------ |
+| Testing (reduce compute processes) | 2c4g | 2c8g |
+| 1M vector groups | 4c8g 50GB | 4c16g 50GB |
+| 5M vector groups | 8c32g 200GB | 16c64g 200GB |
+
+### Milvus Version
+
+Better performance for 100M+ vectors.
+
+[View Milvus official recommended specs](https://milvus.io/docs/prerequisite-docker.md)
+
+| Environment | Minimum (Single Node) | Recommended |
+| ---------------- | --------------------- | ----------- |
+| Testing | 2c8g | 4c16g |
+| 1M vector groups | Not tested | |
+| 5M vector groups | | |
+
+### Zilliz Cloud Version
+
+Zilliz Cloud is built by the Milvus team — a fully managed SaaS vector database with better performance than Milvus and SLA guarantees. [Try Zilliz Cloud](https://zilliz.com.cn/).
+
+Since the vector database runs in the cloud, no local resources are needed.
+
+### SeekDB Version
+
+SeekDB is a high-performance vector database based on MySQL protocol, fully compatible with OceanBase, supporting efficient vector retrieval.
+
+| Environment | Minimum (Single Node) | Recommended |
+| ---------------------------------- | --------------------- | ------------ |
+| Testing (reduce compute processes) | 2c4g | 2c8g |
+| 1M vector groups | 4c8g 50GB | 4c16g 50GB |
+| 5M vector groups | 8c32g 200GB | 16c64g 200GB |
+
+
+
+SeekDB uses MySQL protocol, fully compatible with OceanBase:
+- Supports 1536-dimensional vector retrieval
+- Built-in HNSW index algorithm
+- Batch insert and query optimization
+- Automatic retry and connection pool management
+
+
+
+## Preparation
+
+### 1. Ensure Network Access
+
+If using `OpenAI` or other international model APIs, make sure you can access them, or you'll get `Connection error`. See: [Proxy Solutions](/docs/introduction/development/proxy/nginx)
+
+### 2. Prepare Docker Environment
+
+
+
+```bash
+# Install Docker
+curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
+systemctl enable --now docker
+# Install docker-compose
+curl -L https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
+chmod +x /usr/local/bin/docker-compose
+# Verify installation
+docker -v
+docker-compose -v
+# If it fails, search online for solutions
+```
+
+
+We recommend [Orbstack](https://orbstack.dev/). Install via Homebrew:
+
+```bash
+brew install orbstack
+```
+
+Or [download the installer](https://orbstack.dev/download) directly.
+
+
+
+We recommend storing source code and data in the Linux filesystem when binding to Linux containers, not the Windows filesystem.
+
+You can [install Docker Desktop with WSL 2 backend on Windows](https://docs.docker.com/desktop/wsl/).
+
+Or [install the command-line version of Docker directly in WSL 2](https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop).
+
+
+
+
+## Start Deployment
+
+### 1. Get Configuration Files
+
+#### Method 1: Interactive Script Deployment
+
+Run in Linux/MacOS/Windows WSL. The script guides you through selecting deployment environment, vector database version, IP address, etc.
+
+```bash
+bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
+```
+
+#### Method 2: Manual Download
+If your environment is non-*nix or can't access external networks, manually download `docker-compose.yml`.
+
+1. Download the `docker-compose.yml` file:
+
+
+Click to view docker-compose config file download links for different databases
+
+- **Pgvector**
+ - China mirror (Alibaba Cloud): [docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/cn/docker-compose.pg.yml)
+ - Global mirror (dockerhub, ghcr): [docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/global/docker-compose.pg.yml)
+- **Oceanbase**
+ - China mirror (Alibaba Cloud): [docker-compose.ob.yml](https://doc.fastgpt.cn/deploy/docker/cn/docker-compose.ob.yml)
+ - Global mirror (dockerhub, ghcr): [docker-compose.ob.yml](https://doc.fastgpt.cn/deploy/docker/global/docker-compose.ob.yml)
+- **Milvus**
+ - China mirror (Alibaba Cloud): [docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/cn/docker-compose.milvus.yml)
+ - Global mirror (dockerhub, ghcr): [docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/global/docker-compose.milvus.yml)
+- **Zilliz**
+ - China mirror (Alibaba Cloud): [docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/cn/docker-compose.zilliz.yml)
+ - Global mirror (dockerhub, ghcr): [docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/global/docker-compose.zilliz.yml)
+- **SeekDB**
+ - China mirror (Alibaba Cloud): [docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/cn/docker-compose.seekdb.yml)
+ - Global mirror (dockerhub, ghcr): [docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/global/docker-compose.seekdb.yml)
+
+2. Download the `config.json` file:
+- [config.json](https://doc.fastgpt.cn/deploy/config/config.json)
+
+
+
+Download config.json file:
+- [config.json](https://doc.fastgpt.cn/deploy/config/config.json)
+
+### 2. Modify Environment Variables
+
+For `Zilliz version`, you also need credentials — see [Deploy Zilliz Version: Get Account and Credentials](#deploy-zilliz-version-get-account-and-credentials). Other versions can skip to the next step.
+
+### 3. Open External Ports / Configure Domain
+
+These ports must be accessible:
+
+1. Port 3000 (FastGPT main service)
+2. Port 9000 (S3 service)
+1. Port 3005 (FastGPT SSE MCP server service)
+
+### 4. Start Containers
+
+Run in the same directory as docker-compose.yml. Ensure `docker-compose` version is 2.17+, or automated commands may fail.
+
+```bash
+# Start containers
+docker-compose up -d
+```
+
+### 5. Access FastGPT
+
+Access FastGPT via the port/domain opened in step 3.
+Login username is `root`, password is the `DEFAULT_ROOT_PSW` set in `docker-compose.yml` environment variables.
+Each container restart automatically initializes the root user with password `1234` (matching `DEFAULT_ROOT_PSW`).
+
+### 6. Configure Models
+
+- After first login, the system prompts that `Language Model` and `Index Model` are not configured and automatically redirects to the model configuration page. At least these two model types are required.
+- If the redirect doesn't happen, go to `Account - Model Providers` to configure models. [View tutorial](/docs/introduction/development/modelConfig/ai-proxy)
+- Known issue: after first entering the system, the browser tab may become unresponsive. Close the tab and reopen it.
+
+### 7. Install System Plugins as Needed
+
+Starting from V4.14.0, the fastgpt-plugin image only provides the runtime environment without pre-installed system plugins. All FastGPT systems must manually install system plugins.
+
+* Install via the plugin marketplace — by default it fetches from the public FastGPT Marketplace.
+* If your FastGPT can't access the marketplace, visit [FastGPT Plugin Marketplace](https://marketplace.fastgpt.cn/), download .pkg files, and import them via file upload.
+* You can also sort tools, set default installations, and manage tags.
+
+
+
+## FAQ
+
+### FastGPT and FastGPT-plugin Version Compatibility
+
+| FastGPT-plugin Version | FastGPT Main Service |
+| ---------------------- | -------------------- |
+| 0.5.x | >= 4.14.6 |
+| < 0.5.0 | < 4.14.6 |
+
+### S3 Connection Issues
+
+Check the `STORAGE_EXTERNAL_ENDPOINT` variable — it must be accessible by both the client and FastGPT service.
+
+**Important:**
+
+> Don't use `127.0.0.1` or `localhost` or other loopback addresses. Use the host machine's local IP when deploying with Docker, but set it to a static IP; or use a fixed domain name. This prevents 403 errors caused by URL mismatches when signing object storage URLs.
+>
+> See [Object Storage Configuration & Common Issues](/docs/introduction/development/object-storage)
+
+### Browser Unresponsive After Login
+
+Can't click anything, refresh doesn't help. Close the tab and reopen it.
+
+### Mongo Replica Set Auto-Initialization Failed
+
+The latest docker-compose examples have fully automated Mongo replica set initialization. Tested on Ubuntu 20/22, CentOS 7, WSL2, macOS, and Windows. If it still won't start, the CPU likely doesn't support AVX instructions — switch to Mongo 4.x.
+
+To manually initialize the replica set:
+
+1. Create a mongo key in the terminal:
+
+```bash
+openssl rand -base64 756 > ./mongodb.key
+chmod 600 ./mongodb.key
+# Change key permissions — some systems use admin, others use root
+chown 999:root ./mongodb.key
+```
+
+2. Modify docker-compose.yml to mount the key:
+
+```yml
+mongo:
+ # image: mongo:5.0.18
+ # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # Alibaba Cloud
+ container_name: mongo
+ ports:
+ - 27017:27017
+ networks:
+ - fastgpt
+ command: mongod --keyFile /data/mongodb.key --replSet rs0
+ environment:
+ # Default username and password, only effective on first run
+ - MONGO_INITDB_ROOT_USERNAME=myusername
+ - MONGO_INITDB_ROOT_PASSWORD=mypassword
+ volumes:
+ - ./mongo/data:/data/db
+ - ./mongodb.key:/data/mongodb.key
+```
+
+3. Restart services:
+
+```bash
+docker-compose down
+docker-compose up -d
+```
+
+4. Enter the container and initialize the replica set:
+
+```bash
+# Check if mongo container is running
+docker ps
+# Enter container
+docker exec -it mongo bash
+
+# Connect to database (use your Mongo username and password)
+mongo -u myusername -p mypassword --authenticationDatabase admin
+
+# Initialize replica set. For external access, add directConnection=true to the Mongo connection parameters
+rs.initiate({
+ _id: "rs0",
+ members: [
+ { _id: 0, host: "mongo:27017" }
+ ]
+})
+# Check status — if it shows rs0 status, it's running successfully
+rs.status()
+```
+
+### How to Change API Address and Key
+
+By default, OneAPI connection address and key are configured. Modify the environment variables in the fastgpt container in `docker-compose.yml`:
+
+`OPENAI_BASE_URL` (API endpoint, must include /v1)
+`CHAT_API_KEY` (API credentials)
+
+After modifying, restart:
+
+```bash
+docker-compose down
+docker-compose up -d
+```
+
+### How to Update Versions?
+
+1. Check the [update documentation](/docs/upgrading) to confirm the target version — avoid skipping versions.
+2. Change the image tag to the target version
+3. Run these commands to pull and restart:
+
+ ```bash
+ docker-compose pull
+ docker-compose up -d
+ ```
+
+4. Run initialization scripts (if any)
+
+### How to Customize Configuration Files?
+
+Modify `config.json`, then run `docker-compose down` followed by `docker-compose up -d` to restart. For details, see [Configuration Guide](/docs/introduction/development/configuration).
+
+### How to Check if Custom Config File is Mounted
+
+1. `docker logs fastgpt` shows logs. After starting the container, the first web request reads the config file — check for success or error messages.
+2. `docker exec -it fastgpt sh` enters the container. Use `ls data` to check if `config.json` is mounted. Use `cat data/config.json` to view it.
+
+**Possible reasons it's not working:**
+
+1. Incorrect mount directory
+2. Invalid config file — logs will show `invalid json`. The file must be valid JSON.
+3. Didn't run `docker-compose down` then `docker-compose up -d` after changes. A simple restart doesn't remount files.
+
+### How to Check if Environment Variables Loaded
+
+1. `docker exec -it fastgpt sh` to enter the container.
+2. Run `env` to view all environment variables.
+
+### Why Can't I Connect to Local Model Images
+
+`docker-compose.yml` uses bridge mode to create the `fastgpt` network. To access other images via 0.0.0.0 or image name, add those images to the same network.
+
+### How to Resolve Port Conflicts?
+
+Docker-compose port format: `mapped_port:running_port`.
+
+In bridge mode, container running ports don't conflict, but mapped ports can. Change the mapped port to a different value.
+
+If `container1` needs to connect to `container2`, use `container2:running_port`.
+
+(Brush up on Docker basics as needed)
+
+### relation "modeldata" does not exist
+
+PG database not connected or initialization failed — check logs. FastGPT initializes tables on each PG connection. Errors will appear in the logs.
+
+1. Check if the database container started normally
+2. For non-Docker deployments, manually install the pg vector extension
+3. Check fastgpt logs for related errors
+
+### Illegal instruction
+
+Possible causes:
+
+1. ARM architecture — use the official Mongo image: mongo:5.0.18
+2. CPU doesn't support AVX — switch to mongo4.x. Change the mongo image to: mongo:4.4.29
+
+### Operation `auth_codes.findOne()` buffering timed out after 10000ms
+
+Mongo connection failed — check mongo's running status and **logs**.
+
+Possible causes:
+
+1. Mongo service didn't start (some CPUs don't support AVX — switch to mongo4.x, find the latest 4.x on Docker Hub, update the image version, and rerun)
+2. Database connection environment variables are wrong (username/password, check host and port — for non-container network connections, use public IP and add directConnection=true)
+3. Replica set startup failed, causing the container to keep restarting
+4. `Illegal instruction.... Waiting for MongoDB to start`: CPU doesn't support AVX — switch to mongo4.x
+
+### First Deployment: Root User Shows Unregistered
+
+Logs will show error messages. Most likely Mongo replica set mode wasn't started.
+
+### Can't Export Knowledge Base / Can't Use Voice Input or Playback
+
+SSL certificate not configured — some features require it.
+
+### Login Shows Network Error
+
+Caused by service initialization errors triggering a restart.
+
+- 90% of cases: incorrect config file causing JSON parsing errors
+- The rest: usually because the vector database can't connect
+
+### How to Change Password
+
+Modify `DEFAULT_ROOT_PSW` in `docker-compose.yml` and restart — the password auto-updates.
+
+### Deploy Zilliz Version: Get Account and Credentials
+
+Open [Zilliz Cloud](https://zilliz.com.cn/), create an instance, and get the credentials.
+
+
+
+
+
+1. Set `MILVUS_ADDRESS` and `MILVUS_TOKEN` to match Zilliz's `Public Endpoint` and `Api key`. Remember to add your IP to the whitelist.
+
+
diff --git a/document/content/docs/introduction/development/faq.en.mdx b/document/content/docs/introduction/development/faq.en.mdx
new file mode 100644
index 0000000000..6e12bd34ab
--- /dev/null
+++ b/document/content/docs/introduction/development/faq.en.mdx
@@ -0,0 +1,393 @@
+---
+title: Private Deployment FAQ
+description: FastGPT private deployment common issues
+---
+
+## 1. Error Troubleshooting
+
+Check [Issues](https://github.com/labring/FastGPT/issues) first, or create a new one. For private deployment errors, provide detailed steps, logs, and screenshots — otherwise it's very difficult to diagnose.
+
+### Backend Errors
+
+1. Run `docker ps -a` to check all container statuses. Verify everything is running. If not, use `docker logs ` to view logs.
+2. If containers are running normally, use `docker logs ` to check for error logs.
+
+### Frontend Errors
+
+When the frontend crashes, the page will display an error prompting you to check console logs. Open the browser console and check the `console` tab. Click the log hyperlinks to see the specific error file — provide these details for troubleshooting.
+
+### OneAPI Errors
+
+Errors with `requestId` are from OneAPI, usually caused by model API issues. See [Common OneAPI Errors](/docs/introduction/development/faq/#3-common-oneapi-errors)
+
+## 2. General Issues
+
+### Frontend Page Crash
+
+1. 90% of cases: incorrect model configuration. Ensure each model type has at least one enabled. Check if `object` parameters are abnormal (arrays and objects) — if empty, try providing an empty array or object.
+2. Browser compatibility: the project uses advanced syntax that may not work in older browsers. Provide specific steps and console errors in an issue.
+3. Disable browser translation — it can cause page crashes.
+
+### Does Sealos deployment have fewer limitations than local deployment?
+
+
+This is the index model's length limit — it's the same regardless of deployment method. Different index models have different configurations, which you can modify in the admin panel.
+
+### How to Mount Mini Program Config Files
+
+Mount the verification file to: /app/projects/app/public/xxxx.txt
+
+Then restart. For example:
+
+
+
+### Database Port 3306 Already in Use
+
+
+
+Change the port mapping to something like 3307, e.g., 3307:3306.
+
+### Local Deployment Limitations
+
+See details at https://fael3z0zfze.feishu.cn/wiki/OFpAw8XzAi36Guk8dfucrCKUnjg.
+
+### Can It Run Fully Offline?
+
+Yes. You'll need vector models and LLM models ready.
+
+### Other Models Can't Do Question Classification / Content Extraction
+
+1. Check logs. If you see "JSON invalid" or "not support tool", the model doesn't support tool/function calling. Set `toolChoice=false` and `functionCall=false` to fall back to prompt mode. Built-in prompts are only tested with commercial model APIs. Question classification mostly works; content extraction is less reliable.
+2. If configured correctly with no error logs, the prompts may not suit the model. Customize via `customCQPrompt`.
+
+### Page Crash
+
+1. Disable browser translation.
+2. Check if the config file loaded properly — missing system info causes null pointer errors.
+
+- 95% of cases: incorrect config file, showing "xxx undefined"
+- "URI malformed" error: report the specific operation and page in an issue — caused by special character encoding errors.
+
+3. Some API compatibility issues (rare)
+
+### Slow Response After Enabling Content Completion
+
+1. Content completion requires an additional AI generation round.
+2. Performs 3–5 query rounds — insufficient database performance will cause noticeable slowdowns.
+
+### Page Works Fine, API Returns Errors
+
+The page uses `stream=true` mode, so the API also needs `stream=true` for testing. Some model APIs (especially domestic ones) have poor non-stream compatibility.
+Same as above — test with curl.
+
+### Knowledge Base Indexing Has No Progress / Very Slow
+
+Check error logs first. Possible scenarios:
+
+1. Can chat but no indexing progress: vector model (vectorModels) not configured
+2. Can't chat or index: API call failed — may not be connected to OneAPI or OpenAI
+3. Has progress but very slow: API key issue. OpenAI free accounts have very limited rate limits (3 or 60 requests/minute, 200/day).
+
+### Connection Error
+
+Network issue. Servers in China can't reach OpenAI directly — verify your AI model connection.
+
+Or FastGPT can't reach OneAPI (not on the same network).
+
+### Modified vectorModels But No Effect
+
+1. Restart the container and confirm the model config loaded (check logs or the new knowledge base creation page).
+2. Refresh the browser.
+3. For existing knowledge bases, delete and recreate them. The vector model is bound at creation time and won't update dynamically.
+
+## 3. Common OneAPI Errors
+
+Errors with `requestId` are from OneAPI.
+
+### insufficient_user_quota user quota is not enough
+
+OneAPI account balance insufficient. The default root user only has $200 — increase it manually.
+
+Path: Open OneAPI -> Users -> Edit root user -> Increase remaining balance
+
+### xxx Channel Not Found
+
+The model in FastGPT's config must match a model in OneAPI channels. Check:
+
+1. The model channel isn't configured in OneAPI, or is disabled.
+2. FastGPT config has models not configured in OneAPI. Don't add models to config that OneAPI doesn't have.
+3. Created a knowledge base with an old vector model, then updated the vector model. Delete old knowledge bases and recreate.
+
+If OneAPI doesn't have the model configured, don't add it to `config.json` either.
+
+### Model Test Click Fails
+
+OneAPI only tests the first model in a channel, and only chat models. Vector models can't be auto-tested — send manual requests. [View test command examples](/docs/introduction/development/faq/#how-to-check-model-issues)
+
+### get request url failed: Post `"https://xxx"` dial tcp: xxxx
+
+OneAPI can't reach the model — check network configuration.
+
+### Incorrect API key provided: sk-xxxx.You can find your api Key at xxx
+
+OneAPI API Key configured incorrectly. Modify the `OPENAI_API_KEY` environment variable and restart (`docker-compose down` then `docker-compose up -d`).
+
+Use `exec` to enter the container, then `env` to verify environment variables.
+
+### bad_response_status_code bad response status code 503
+
+1. Model service unavailable
+2. Incompatible model API parameters (temperature, max token, etc.)
+3. ...
+
+### Tiktoken Download Failed
+
+OneAPI downloads a tiktoken dependency at startup. Network failure causes startup failure. See [OneAPI Offline Deployment](https://blog.csdn.net/wanh/article/details/139039216).
+
+## 4. Common Model Issues
+
+### How to Check Model Availability
+
+1. For self-hosted models, confirm the deployment is working.
+2. Use CURL to directly test the upstream model (both cloud and private models).
+3. Use CURL to test through OneAPI.
+4. Test the model in FastGPT.
+
+Here are some test CURL examples:
+
+
+
+```bash
+curl https://api.openai.com/v1/chat/completions \
+ -H "Content-Type: application/json" \
+ -H "Authorization: Bearer $OPENAI_API_KEY" \
+ -d '{
+ "model": "gpt-4o",
+ "messages": [
+ {
+ "role": "system",
+ "content": "You are a helpful assistant."
+ },
+ {
+ "role": "user",
+ "content": "Hello!"
+ }
+ ]
+ }'
+```
+
+
+```bash
+curl https://api.openai.com/v1/embeddings \
+ -H "Authorization: Bearer $OPENAI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "input": "The food was delicious and the waiter...",
+ "model": "text-embedding-ada-002",
+ "encoding_format": "float"
+ }'
+```
+
+
+```bash
+curl --location --request POST 'https://xxxx.com/api/v1/rerank' \
+--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "bge-rerank-m3",
+ "query": "导演是谁",
+ "documents": [
+ "你是谁?\n我是电影《铃芽之旅》助手"
+ ]
+}'
+```
+
+
+```bash
+curl https://api.openai.com/v1/audio/speech \
+ -H "Authorization: Bearer $OPENAI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "tts-1",
+ "input": "The quick brown fox jumped over the lazy dog.",
+ "voice": "alloy"
+ }' \
+ --output speech.mp3
+```
+
+
+```bash
+curl https://api.openai.com/v1/audio/transcriptions \
+ -H "Authorization: Bearer $OPENAI_API_KEY" \
+ -H "Content-Type: multipart/form-data" \
+ -F file="@/path/to/file/audio.mp3" \
+ -F model="whisper-1"
+```
+
+
+
+### Error — Model Response Empty / Model Error
+
+This occurs when OneAPI ends the stream request without returning any content.
+
+Version 4.8.10 added error logging — the actual request body is printed in logs on error. Copy it and use curl to test against OneAPI.
+
+Since OneAPI can't properly catch errors in stream mode, you can set `stream=false` to get precise error messages.
+
+Possible causes:
+
+1. Content moderation triggered
+2. Unsupported model parameters: keep only messages and essential parameters, remove the rest
+3. Parameters don't meet model requirements: e.g., some models don't support temperature=0, some don't support two decimal places, max_tokens exceeded, context too long, etc.
+4. Model deployment issues with stream mode incompatibility
+
+Test example — copy the request body from error logs:
+
+```bash
+curl --location --request POST 'https://api.openai.com/v1/chat/completions' \
+--header 'Authorization: Bearer sk-xxxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "xxx",
+ "temperature": 0.01,
+ "max_tokens": 1000,
+ "stream": true,
+ "messages": [
+ {
+ "role": "user",
+ "content": " 你是饿"
+ }
+ ]
+}'
+```
+
+### How to Test if a Model Supports Tool Calling
+
+Both the model provider and OneAPI must support tool calling. Test as follows:
+
+##### 1. Send a first-round stream mode tool call request to OneAPI via `curl`.
+
+```bash
+curl --location --request POST 'https://oneapi.xxx/v1/chat/completions' \
+--header 'Authorization: Bearer sk-xxxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "gpt-5",
+ "temperature": 0.01,
+ "max_tokens": 8000,
+ "stream": true,
+ "messages": [
+ {
+ "role": "user",
+ "content": "几点了"
+ }
+ ],
+ "tools": [
+ {
+ "type": "function",
+ "function": {
+ "name": "hCVbIY",
+ "description": "获取用户当前时区的时间。",
+ "parameters": {
+ "type": "object",
+ "properties": {},
+ "required": []
+ }
+ }
+ }
+ ],
+ "tool_choice": "auto"
+}'
+```
+
+##### 2. Check the Response
+
+If tool calling works, the response includes `tool_calls` parameters.
+
+```json
+{
+ "id": "chatcmpl-A7kwo1rZ3OHYSeIFgfWYxu8X2koN3",
+ "object": "chat.completion.chunk",
+ "created": 1726412126,
+ "model": "gpt-5",
+ "system_fingerprint": "fp_483d39d857",
+ "choices": [
+ {
+ "index": 0,
+ "id": "call_0n24eiFk8OUyIyrdEbLdirU7",
+ "type": "function",
+ "function": {
+ "name": "mEYIcFl84rYC",
+ "arguments": ""
+ }
+ }
+ ],
+ "refusal": null
+ },
+ "logprobs": null,
+ "finish_reason": null
+ }
+ ],
+ "usage": null
+}
+```
+
+##### 3. Send a second-round stream mode tool call request to OneAPI via `curl`.
+
+The second round sends tool results back to the model and returns the model's response.
+
+```bash
+curl --location --request POST 'https://oneapi.xxxx/v1/chat/completions' \
+--header 'Authorization: Bearer sk-xxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "model": "gpt-5",
+ "temperature": 0.01,
+ "max_tokens": 8000,
+ "stream": true,
+ "messages": [
+ {
+ "role": "user",
+ "content": "几点了"
+ },
+ {
+ "role": "assistant",
+ "tool_calls": [
+ {
+ "id": "kDia9S19c4RO",
+ "type": "function",
+ "function": {
+ "name": "hCVbIY",
+ "arguments": "{}"
+ }
+ }
+ ]
+ },
+ {
+ "tool_call_id": "kDia9S19c4RO",
+ "role": "tool",
+ "name": "hCVbIY",
+ "content": "{\n \"time\": \"2024-09-14 22:59:21 Sunday\"\n}"
+ }
+ ],
+ "tools": [
+ {
+ "type": "function",
+ "function": {
+ "name": "hCVbIY",
+ "description": "获取用户当前时区的时间。",
+ "parameters": {
+ "type": "object",
+ "properties": {},
+ "required": []
+ }
+ }
+ }
+ ],
+ "tool_choice": "auto"
+}'
+```
+
+### Vector Retrieval Score Greater Than 1
+
+Caused by the model not being normalized. Only normalized models are currently supported.
diff --git a/document/content/docs/introduction/development/intro.en.mdx b/document/content/docs/introduction/development/intro.en.mdx
new file mode 100644
index 0000000000..e5918c5b85
--- /dev/null
+++ b/document/content/docs/introduction/development/intro.en.mdx
@@ -0,0 +1,224 @@
+---
+title: Local Development Setup
+description: Develop and debug FastGPT locally
+---
+
+import { Alert } from '@/components/docs/Alert';
+import FastGPTLink from '@/components/docs/linkFastGPT';
+
+This guide covers how to set up your development environment to build and test FastGPT.
+
+## Prerequisites
+
+Install and configure these dependencies on your machine to build FastGPT:
+
+- [Git](https://git-scm.com/)
+- [Docker](https://www.docker.com/)
+- [Node.js v20.14.0](https://nodejs.org) (match this version closely; use [nvm](https://github.com/nvm-sh/nvm) to manage Node versions)
+- [pnpm](https://pnpm.io/) recommended version 9.4.0 (current official dev environment)
+
+We recommend developing on *nix environments (Linux, macOS, Windows WSL).
+
+## Local Development
+
+### 1. Fork the FastGPT Repository
+
+Fork the [FastGPT repository](https://github.com/labring/FastGPT).
+
+### 2. Clone the Repository
+
+Clone your forked repository from GitHub:
+
+```
+git clone git@github.com:/FastGPT.git
+```
+
+
+### 3. Start the Development Environment with Docker
+
+If you're already running FastGPT locally via Docker, stop it first to avoid port conflicts.
+
+Navigate to `FastGPT/deploy/dev` and run `docker compose up -d` to start FastGPT's dependencies:
+
+```bash
+cd FastGPT/deploy/dev
+docker compose up -d
+```
+
+
+ 1. If you can't pull images, use the China mirror version: `docker compose -f docker-compose.cn.yml up -d`
+ 2. For MongoDB, add the `directConnection=true` parameter to your connection string to connect to the replica set.
+
+
+### 4. Initial Configuration
+
+All files below are in the `projects/app` directory.
+
+```bash
+# Make sure you're in projects/app
+pwd
+# Should output /xxxx/xxxx/xxx/FastGPT/projects/app
+```
+
+**1. Environment Variables**
+
+Copy `.env.template` to create `.env.local` in the same directory. Only changes in `.env.local` take effect.
+See `.env.template` for variable descriptions.
+If you haven't modified variables in docker-compose.yaml, the defaults in `.env.template` work as-is. Otherwise, match the values in your `yml` file.
+
+```bash
+cp .env.template .env.local
+```
+
+**2. config.json Configuration File**
+
+Copy `data/config.json` to create `data/config.local.json`. For detailed parameters, see [Configuration Guide](/docs/introduction/development/configuration).
+
+```bash
+cp data/config.json data/config.local.json
+```
+
+This file usually doesn't need changes. Key `systemEnv` parameters:
+
+- `vectorMaxProcess`: Max vector generation processes. Depends on database and key concurrency — for a 2c4g server, set to 10–15.
+- `qaMaxProcess`: Max QA generation processes
+- `vlmMaxProcess`: Max image understanding model processes
+- `hnswEfSearch`: Vector search parameter (PG and OB only). Higher values = better accuracy but slower speed.
+
+### 5. Run
+
+See `dev.md` in the project root. The first compile may take a while — be patient.
+
+```bash
+# Run from the code root directory to install all dependencies
+# If isolate-vm installation fails, see: https://github.com/laverdet/isolated-vm?tab=readme-ov-file#requirements
+pwd # Should be in the code root directory
+pnpm i
+cd projects/app
+pnpm dev
+```
+
+Next.js runs on port 3000 by default. Visit http://localhost:3000
+
+### 6. Build
+
+We recommend using Docker for builds.
+```bash
+# Without proxy
+docker build -f ./projects/app/Dockerfile -t fastgpt . --build-arg name=app
+# With Taobao proxy
+docker build -f ./projects/app/Dockerfile -t fastgpt. --build-arg name=app --build-arg proxy=taobao
+```
+
+Without Docker, you'd need to manually execute all the run-stage commands from the `Dockerfile` (not recommended).
+
+## Contributing to the Open Source Repository
+
+1. Make sure your code is forked from the [FastGPT](https://github.com/labring/FastGPT) repository.
+2. Keep commits small and focused — each should address one issue.
+3. Submit a PR to FastGPT's main branch. The FastGPT team and community will review it with you.
+
+If you run into issues like merge conflicts, check GitHub's [pull request tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests). Once your PR is merged, you'll be listed in the [contributors table](https://github.com/labring/FastGPT/graphs/contributors).
+
+## QA
+
+### System Time Anomaly
+
+If your default timezone is `Asia/Shanghai`, system time may be incorrect in non-Linux environments. For local development, change your timezone to UTC (+0).
+
+### Can't Connect to Local Database
+
+1. For remote databases, check if the port is open.
+2. For local databases, try changing `host` to `localhost` or `127.0.0.1`.
+3. For local connections to remote MongoDB, add `directConnection=true` to connect to replica sets.
+4. Use `mongocompass` for MongoDB connection testing and visual management.
+5. Use `navicat` for PostgreSQL connection and management.
+
+### sh ./scripts/postinstall.sh Permission Denied
+
+FastGPT runs a `postinstall` script after `pnpm i` to auto-generate ChakraUI types. If you get a permission error, run `chmod -R +x ./scripts/` first, then `pnpm i`.
+
+If that doesn't work, manually execute the contents of `./scripts/postinstall.sh`.
+_On Windows, use git bash to add execute permissions and run the script._
+
+### TypeError: Cannot read properties of null (reading 'useMemo')
+
+Delete all `node_modules` and reinstall with Node 18 — newer Node versions may have issues. Local dev workflow:
+
+1. Root directory: `pnpm i`
+2. Copy `config.json` -> `config.local.json`
+3. Copy `.env.template` -> `.env.local`
+4. `cd projects/app`
+5. `pnpm dev`
+
+### Error response from daemon: error while creating mount source path 'XXX': mkdir XXX: file exists
+
+This may be caused by leftover files from a previous container stop. Make sure all related containers are stopped, then manually delete the files or restart Docker.
+
+## Join the Community
+
+Having trouble? Join the Lark group to connect with developers and users.
+
+
+
+## Code Structure
+
+### Next.js
+
+FastGPT uses Next.js page routing. To separate frontend and backend code, directories are split into global, service, and web subdirectories for shared, backend-only, and frontend-only code respectively.
+
+### Monorepo
+
+FastGPT uses pnpm workspace for its monorepo structure, with two main parts:
+
+- projects/app - FastGPT main project
+- packages/ - Submodules
+ - global - Shared code: functions, type declarations, and constants usable on both frontend and backend
+ - service - Server-side code
+ - web - Frontend code
+ - plugin - Custom workflow plugin code
+
+### Domain-Driven Design (DDD)
+
+FastGPT's code modules follow DDD principles, divided into these domains:
+
+- core - Core features (knowledge base, workflow, app, conversation)
+- support - Supporting features (user system, billing, authentication, etc.)
+- common - Base features (log management, file I/O, etc.)
+
+
+Code Structure Details
+
+```
+.
+├── .github // GitHub config
+├── .husky // Formatting config
+├── document // Documentation
+├── files // External files, e.g., docker-compose, helm
+├── packages // Subpackages
+│ ├── global // Frontend/backend shared subpackage
+│ ├── plugins // Workflow plugins (for custom packages)
+│ ├── service // Backend subpackage
+│ └── web // Frontend subpackage
+├── projects
+│ └── app // FastGPT main project
+├── python // Model code, unrelated to FastGPT itself
+└── scripts // Automation scripts
+ ├── icon // Icon scripts: pnpm initIcon (write SVG to code), pnpm previewIcon (preview icons)
+ └── postinstall.sh // ChakraUI custom theme TS type initialization
+├── package.json // Top-level monorepo
+├── pnpm-lock.yaml
+├── pnpm-workspace.yaml // Monorepo declaration
+├── Dockerfile
+├── LICENSE
+├── README.md
+├── README_en.md
+├── README_ja.md
+├── dev.md
+```
+
+
diff --git a/document/content/docs/introduction/development/meta.en.json b/document/content/docs/introduction/development/meta.en.json
new file mode 100644
index 0000000000..3cb5286ffa
--- /dev/null
+++ b/document/content/docs/introduction/development/meta.en.json
@@ -0,0 +1,19 @@
+{
+ "title": "Community Edition",
+ "description": "FastGPT Community Edition",
+ "icon": "🔧",
+ "pages": [
+ "sealos",
+ "docker",
+ "faq",
+ "intro",
+ "configuration",
+ "object-storage",
+ "signoz",
+ "modelConfig",
+ "custom-models",
+ "proxy",
+ "migration",
+ "design"
+ ]
+}
diff --git a/document/content/docs/introduction/development/migration/docker_db.en.mdx b/document/content/docs/introduction/development/migration/docker_db.en.mdx
new file mode 100644
index 0000000000..0be923c61b
--- /dev/null
+++ b/document/content/docs/introduction/development/migration/docker_db.en.mdx
@@ -0,0 +1,20 @@
+---
+title: Docker Database Migration (Simple Method)
+description: FastGPT Docker database backup and migration
+---
+
+## 1. Stop Services
+
+```bash
+docker-compose down
+```
+
+
+## 2. Copy Directories
+
+Docker-deployed databases mount local directories into containers via volumes. To migrate, simply copy these directories.
+
+`PG data`: pg/data
+`Mongo data`: mongo/data
+
+Just copy the entire pg and mongo directories to the new location.
diff --git a/document/content/docs/introduction/development/migration/docker_mongo.en.mdx b/document/content/docs/introduction/development/migration/docker_mongo.en.mdx
new file mode 100644
index 0000000000..83c55ead5f
--- /dev/null
+++ b/document/content/docs/introduction/development/migration/docker_mongo.en.mdx
@@ -0,0 +1,176 @@
+---
+title: Docker MongoDB Migration (Dump Mode)
+description: FastGPT Docker MongoDB migration
+---
+
+## Author
+
+[https://github.com/samqin123](https://github.com/samqin123)
+
+[Related PR -- open this to discuss with the author](https://github.com/labring/FastGPT/pull/1426)
+
+## Overview
+
+How to use mongodump to migrate FastGPT's MongoDB from Environment A to Environment B.
+
+Prerequisites:
+
+- Environment A: Your existing FastGPT deployment (e.g., on Alibaba Cloud) that needs to be migrated.
+- Environment B: The new FastGPT deployment (e.g., on Tencent Cloud, or a NAS like Synology/QNAP). Note: NAS deployments may require MongoDB 4.2 or 4.4, while cloud deployments support the default FastGPT MongoDB version.
+- Environment C: Your local machine, used as a staging area to hold files and coordinate the transfer.
+
+## 1. Prepare: Access Docker MongoDB [Environment A]
+```
+docker exec -it mongo sh
+mongo -u 'username' -p 'password'
+>> show dbs
+```
+Confirm you can see the fastgpt database and note the database name for export.
+
+##### Preparation:
+
+Create a temporary directory for import/export on both the container and the host, e.g., data/backup [Environment A + Environment C].
+
+#### Create the directory in [Environment A] for the dump operation
+Enter the FastGPT Docker container:
+```
+docker exec -it fastgpt sh
+mkdir -p /data/backup
+```
+
+Once created, exported MongoDB data will appear in the `data/backup` directory under your local FastGPT installation folder (auto-synced via volume mount). If it doesn't sync automatically, you can manually create the directory and use `docker cp` to copy files out (this rarely happens).
+
+#### Then set up the [Environment C] host directory for syncing uploaded files into the container.
+Navigate to the FastGPT directory, go into the mongo folder, and create a backup subdirectory:
+```
+mkdir -p /fastgpt/data/backup
+```
+Also create a directory in the new [Environment B]:
+```
+mkdir -p /fastgpt/mongobackup
+```
+
+###2. Export Data from [Environment A]
+Enter Environment A and use mongodump to export the MongoDB database.
+
+#### 2.1 Export
+Run mongodump to export data files to the temporary directory (data/backup).
+
+[The export path is set to /data/backup in the command. Since the FastGPT config already has data persistence set up, the exported files will sync to the host's fastgpt/mongo/data/backup directory.]
+
+Single command to export (run on the host, no need to enter the container):
+```
+docker exec -it mongo bash -c "mongodump --db fastgpt -u 'username' -p 'password' --authenticationDatabase admin --out /data/backup"
+```
+
+You can also enter the container and combine directory creation with the export:
+```
+1.docker exec -it fastgpt sh
+
+2.mkdir -p /data/backup
+
+3. mongodump --host 127.0.0.1:27017 --db fastgpt -u "username" -p "password" --authenticationDatabase admin --out /data/backup
+```
+
+##### Fallback: if files don't auto-sync, manually copy them to the host [Environment A]:
+```
+docker cp mongo:/data/backup [local-fastgpt-dir]:/fastgpt/data/backup>
+```
+
+2.2 For beginners, it's recommended to compress the directory and download it to your local staging environment [A -> C] for verification. This ensures you have a backup and can check file counts. Experienced users can transfer directly to the new server [A -> B].
+
+
+2.2.1 Navigate to the [Environment A] source system's local fastgpt/mongo/data directory:
+
+```
+cd /usr/fastgpt/mongo/data
+```
+
+Compress the files:
+```
+tar -czvf ../fastgpt-mongo-backup-$(date +%Y-%m-%d).tar.gz ./
+```
+Download the archive to your local machine [A -> C] for verification. Experienced users can sync directly to Environment B's fastgpt data directory.
+
+```
+scp -i /Users/path/[your-pem-file] root@[cloud-server-ip]:/usr/fastgpt/mongo/fastgptbackup-2024-05-03.tar.gz /[local-path]/Downloads/fastgpt
+
+```
+Experienced users can transfer directly to the new environment:
+
+```
+scp -i /Users/path/[your-pem-file] root@[old-server-ip]:/usr/fastgpt/mongo/fastgptbackup-2024-05-03.tar.gz root@[new-server-ip]:/Downloads/fastgpt2
+
+```
+
+2.2 [Environment C] Verify the archive is complete. If not, re-export. Cross-environment scp transfers can occasionally lose data.
+
+After downloading the archive to Environment C, extract it to a custom directory, e.g., user/fastgpt/mongobackup/data:
+
+```
+tar -xvzf fastgptbackup-2024-05-03.tar.gz -C user/fastgpt/mongobackup/data
+```
+The extracted files should be .bson files. Verify the file count matches the source. If they don't match, the new FastGPT environment will have no data after import.
+
+
+
+
+If everything looks good, upload the archive to Environment B's designated directory (e.g., /fastgpt/mongobackup). Do not place it in fastgpt/data/ -- that directory will be cleared later, and having extra files there will cause import errors.
+```
+scp -rfv [local-path]/Downloads/fastgpt/fastgptbackup-2024-05-03.tar.gz root@[new-server-ip]:/Downloads/fastgpt/backup
+```
+
+## 3. Import and Restore
+
+### 3.1. Extract the archive on the new FastGPT environment
+
+```
+tar -xvzf fastgptbackup-2024-05-03.tar.gz -C user/fastgpt/mongobackup/data
+```
+Verify the file count again against your earlier check.
+
+Experienced users can use tar to verify archive integrity. The above steps are for beginners to facilitate comparison.
+
+
+### 3.2 Manually copy files into the new FastGPT Docker container [Environment C]
+Since the files aren't in the data/ directory, they won't auto-sync into the container. Also ensure the container's data directory is clean, or the import will fail.
+
+```
+docker cp user/fastgpt/mongobackup/data mongo:/tmp/backup
+```
+
+### 3.3 Initialize docker compose -- run it once to create the new mongo/data persistence directory
+If the mongo/db directory isn't freshly initialized, mongorestore may fail. If you encounter errors, try initializing mongo.
+
+Commands:
+```
+cd /fastgpt-install-dir/mongo/data
+rm -rf *
+```
+
+
+4. Restore with mongorestore [Environment C]
+Run this from the host to import in one command (you can also run it inside the container):
+
+```
+docker exec -it mongo mongorestore -u "username" -p "password" --authenticationDatabase admin /tmp/backup/ --db fastgpt
+```
+
+Note: if the imported file count seems too low, the import likely failed. A failed import means you can log in to FastGPT but see no data.
+
+
+5. Restart containers [Environment C]
+```
+docker compose restart
+docker logs -f mongo # Strongly recommended: check mongo logs before logging in. If mongo has errors, the web UI will also show errors.
+```
+
+If mongo starts normally, you should see output like this (not "mongo is restarting" -- that indicates an error):
+
+
+Error state:
+
+
+
+6. After starting the FastGPT container, log in to the web UI. If all your original data is displayed, the migration was successful.
+
diff --git a/document/content/docs/introduction/development/migration/meta.en.json b/document/content/docs/introduction/development/migration/meta.en.json
new file mode 100644
index 0000000000..0acb9cbc83
--- /dev/null
+++ b/document/content/docs/introduction/development/migration/meta.en.json
@@ -0,0 +1,7 @@
+{
+ "title": "Migration & Backup",
+ "pages": [
+ "docker_db",
+ "docker_mongo"
+ ]
+}
diff --git a/document/content/docs/introduction/development/modelConfig/ai-proxy.en.mdx b/document/content/docs/introduction/development/modelConfig/ai-proxy.en.mdx
new file mode 100644
index 0000000000..30dda8a994
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/ai-proxy.en.mdx
@@ -0,0 +1,125 @@
+---
+title: Connect Models via AI Proxy
+description: Connect Models via AI Proxy
+---
+
+Starting from `FastGPT 4.8.23`, AI Proxy was introduced to further simplify model configuration.
+
+Similar to One API, AI Proxy serves as an OpenAI API management and distribution system that provides access to all LLMs through the standard OpenAI API format, ready to use out of the box.
+
+## Deployment
+
+### Docker Version
+
+The `docker-compose.yml` file already includes the AI Proxy configuration and can be used directly. [View the latest yml configuration](https://raw.githubusercontent.com/labring/FastGPT/main/deploy/docker/docker-compose-pgvector.yml)
+
+If upgrading from an older version, copy the AI Proxy section from the yml and add it to your existing yml file.
+
+## How It Works
+
+AI Proxy core modules:
+
+1. Channel Management: Manage API keys and available model lists from various model providers.
+2. Model Invocation: Select the corresponding channel based on the requested model; construct the request body according to the channel's API format and send the request; format the response into a standard format before returning.
+3. Call Logs: Detailed logging of model invocations, with the ability to record input parameters and error messages on failure for easier debugging.
+
+Workflow:
+
+
+
+## Using AI Proxy in FastGPT
+
+AI Proxy features can be found on the `Account - Model Providers` page.
+
+### 1. Create a Channel
+
+On the `Model Providers` configuration page, click `Model Channels` to enter the channel configuration page.
+
+
+
+Click "Add Channel" in the upper right corner to enter the channel configuration page.
+
+
+
+Using Alibaba Cloud models as an example:
+
+
+
+1. Channel Name: The display name for the channel, used for identification only;
+2. Provider: The provider corresponding to the model. Different providers have different default addresses and API key formats;
+3. Models: The specific models available for this channel. The system includes mainstream models by default. If the desired option is not in the dropdown, click "Add Model" to [add a custom model](/docs/introduction/development/modelconfig/intro/#add-custom-models);
+4. Model Mapping: Map the model requested by FastGPT to the actual model provided. For example:
+
+```json
+{
+ "gpt-4o-test": "gpt-4o"
+}
+```
+
+The model in FastGPT is `gpt-4o-test`, and the request to AI Proxy also uses `gpt-4o-test`. When AI Proxy sends the request upstream, the actual `model` is `gpt-4o`.
+
+5. Proxy Address: The actual request address. The system provides default addresses for each mainstream channel. No need to fill in if no changes are required.
+6. API Key: The API credentials obtained from the model provider. Note that some providers require multiple key combinations — follow the prompts to enter them.
+
+Click "Add" to see the newly configured channel under "Model Channels".
+
+
+
+### 2. Channel Testing
+
+You can then test the channel to ensure the configured models are working properly.
+
+
+
+Click "Model Test" to see the list of configured models, then click "Start Test".
+
+
+
+After the test completes, the results and request duration for each model will be displayed.
+
+
+
+### 3. Enable Models
+
+Finally, in `Model Configuration`, you can enable the corresponding models to use them on the platform. For more model configuration details, see [Model Configuration](/docs/introduction/development/modelconfig/intro).
+
+
+
+## Other Features
+
+### Priority
+
+Range: 1-100. Higher values are more likely to be selected first.
+
+
+
+### Enable/Disable
+
+In the control menu on the right side of a channel, you can enable or disable it. Disabled channels will no longer provide model services.
+
+
+
+### Call Logs
+
+The `Call Logs` page displays request records sent to models, including input/output tokens, request time, duration, request address, and more. Failed requests include detailed input parameters and error messages for debugging, but are only retained for 1 hour (configurable via environment variables).
+
+
+
+## Migrating from OneAPI to AI Proxy
+
+You can send an HTTP request from any terminal. Replace `{{host}}` with the AI Proxy address and `{{admin_key}}` with the value of `ADMIN_KEY` in AI Proxy.
+
+The body parameter `dsn` is the MySQL connection string for OneAPI.
+
+```bash
+curl --location --request POST '{{host}}/api/channels/import/oneapi' \
+--header 'Authorization: Bearer {{admin_key}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "dsn": "mysql://root:s5mfkwst@tcp(dbconn.sealoshzh.site:33123)/mydb"
+}'
+```
+
+A successful execution returns `"success": true`.
+
+The migration script is not fully precise — it only performs simple data mapping, primarily migrating `proxy addresses`, `models`, and `API keys`. Manual verification after migration is recommended.
diff --git a/document/content/docs/introduction/development/modelConfig/intro.en.mdx b/document/content/docs/introduction/development/modelConfig/intro.en.mdx
new file mode 100644
index 0000000000..2c7174a60f
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/intro.en.mdx
@@ -0,0 +1,462 @@
+---
+title: FastGPT Model Configuration Guide
+description: FastGPT Model Configuration Guide
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+Before version 4.8.20, FastGPT model configuration was declared in the `config.json` file. You can find the legacy configuration file example at https://github.com/labring/FastGPT/blob/main/projects/app/data/model.json.
+
+Starting from version 4.8.20, you can configure models directly in the FastGPT UI. The system includes a large number of built-in models, so you don't need to start from scratch. Here's the basic configuration flow:
+
+## Configuring Models
+
+### 1. Connect to Model Providers
+
+#### AI Proxy
+
+Starting from version 4.8.23, FastGPT supports configuring model providers directly in the UI using [AI Proxy](/docs/introduction/development/modelconfig/ai-proxy) for model aggregation, enabling connections to more providers.
+
+#### One API
+
+You can also use the [OneAPI Integration Guide](/docs/introduction/development/modelconfig/one-api). You'll need to apply for API access from each provider and add them to OneAPI before using them in FastGPT. Example flow:
+
+
+
+Besides official provider services, there are third-party services that offer model access. You can also use Ollama to deploy local models — all of these ultimately connect through OneAPI. Here are some third-party providers:
+
+
+ - [SiliconCloud](https://cloud.siliconflow.cn/i/TR9Ym0c4): A platform for open source model APIs. -
+ [Sealos AIProxy](https://hzh.sealos.run/?uid=fnWRt09fZP&openapp=system-aiproxy):
+ Proxies for various Chinese model providers — no need to apply for each API separately.
+
+
+Once you've configured models in OneAPI, open the FastGPT page and enable the corresponding models.
+
+### 2. Configuration Overview
+
+
+ Note: 1. Only one speech recognition model can be active at a time, so you only need to configure one. 2.
+ The system requires at least one language model and one embedding model to function properly.
+
+
+#### Core Configuration
+
+- Model ID: The value of the `model` field in the API request body. Must be globally unique.
+- Custom Request URL/Key: If you need to bypass OneAPI, you can set a custom request URL and token. Generally not needed, but useful if OneAPI doesn't support certain models.
+
+#### Model Types
+
+1. Language Model - Text conversations; multimodal models support image recognition.
+2. Embedding Model - Indexes text chunks for relevant text retrieval.
+3. Rerank Model - Reorders retrieval results to optimize ranking.
+4. Text-to-Speech - Converts text to audio.
+5. Speech-to-Text - Converts audio to text.
+
+#### Enabling Models
+
+The system includes built-in models from mainstream providers. If you're unfamiliar with configuration, just click `Enable`. Make sure the `Model ID` matches the `Model` name in your OneAPI channel.
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+#### Modifying Model Configuration
+
+Click the gear icon on the right side of a model to configure it. Different model types have different configuration options.
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+## Adding Custom Models
+
+If the built-in models don't meet your needs, you can add custom models. If a custom model's `Model ID` matches a built-in model ID, it will be treated as a modification of the built-in model.
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+#### Configuration via Config File
+
+If you find UI-based model configuration tedious, or want to quickly copy configuration from one system to another, you can use config files instead.
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+**Language Model Field Descriptions:**
+
+```json
+{
+ "model": "Model ID",
+ "metadata": {
+ "isCustom": true, // Whether this is a custom model
+ "isActive": true, // Whether this model is enabled
+ "provider": "OpenAI", // Model provider, mainly for categorization display. Built-in providers: https://github.com/labring/FastGPT/blob/main/packages/global/core/ai/provider.ts. You can submit a PR for new providers, or use "Other"
+ "model": "gpt-5", // Model ID (matches the model name in OneAPI channel)
+ "name": "gpt-5", // Model display name
+ "maxContext": 125000, // Max context length
+ "maxResponse": 16000, // Max response length
+ "quoteMaxToken": 120000, // Max quote content tokens
+ "maxTemperature": 1.2, // Max temperature
+ "charsPointsPrice": 0, // n points/1k tokens (commercial version)
+ "censor": false, // Enable content moderation (commercial version)
+ "vision": true, // Supports image input
+ "datasetProcess": true, // Use as text understanding model (QA). At least one model must have this set to true, otherwise the knowledge base will error
+ "usedInClassify": true, // Use for question classification (at least one must be true)
+ "usedInExtractFields": true, // Use for content extraction (at least one must be true)
+ "usedInToolCall": true, // Use for tool calling (at least one must be true)
+ "toolChoice": true, // Supports tool choice (used in classification, extraction, and tool calling)
+ "functionCall": false, // Supports function calling (used in classification, extraction, and tool calling). toolChoice takes priority; if false, falls back to functionCall; if still false, falls back to prompt mode
+ "customCQPrompt": "", // Custom classification prompt (for models without tool/function call support)
+ "customExtractPrompt": "", // Custom content extraction prompt
+ "defaultSystemChatPrompt": "", // Default system prompt for conversations
+ "defaultConfig": {}, // Default config sent with API requests (e.g., GLM4's top_p)
+ "fieldMap": {} // Field mapping (e.g., o1 models need max_tokens mapped to max_completion_tokens)
+ }
+}
+```
+
+**Embedding Model Field Descriptions:**
+
+```json
+{
+ "model": "Model ID",
+ "metadata": {
+ "isCustom": true, // Whether this is a custom model
+ "isActive": true, // Whether this model is enabled
+ "provider": "OpenAI", // Model provider
+ "model": "text-embedding-3-small", // Model ID
+ "name": "text-embedding-3-small", // Model display name
+ "charsPointsPrice": 0, // n points/1k tokens
+ "defaultToken": 512, // Default token count for text splitting
+ "maxToken": 3000 // Max tokens
+ }
+}
+```
+
+**Rerank Model Field Descriptions:**
+
+```json
+{
+ "model": "Model ID",
+ "metadata": {
+ "isCustom": true, // Whether this is a custom model
+ "isActive": true, // Whether this model is enabled
+ "provider": "BAAI", // Model provider
+ "model": "bge-reranker-v2-m3", // Model ID
+ "name": "ReRanker-Base", // Model display name
+ "requestUrl": "", // Custom request URL
+ "requestAuth": "", // Custom request auth
+ "type": "rerank" // Model type
+ }
+}
+```
+
+**Text-to-Speech Model Field Descriptions:**
+
+```json
+{
+ "model": "Model ID",
+ "metadata": {
+ "isActive": true, // Whether this model is enabled
+ "isCustom": true, // Whether this is a custom model
+ "type": "tts", // Model type
+ "provider": "FishAudio", // Model provider
+ "model": "fishaudio/fish-speech-1.5", // Model ID
+ "name": "fish-speech-1.5", // Model display name
+ "voices": [
+ // Voice options
+ {
+ "label": "fish-alex", // Voice name
+ "value": "fishaudio/fish-speech-1.5:alex" // Voice ID
+ },
+ {
+ "label": "fish-anna", // Voice name
+ "value": "fishaudio/fish-speech-1.5:anna" // Voice ID
+ }
+ ],
+ "charsPointsPrice": 0 // n points/1k tokens
+ }
+}
+```
+
+**Speech-to-Text Model Field Descriptions:**
+
+```json
+{
+ "model": "whisper-1",
+ "metadata": {
+ "isActive": true, // Whether this model is enabled
+ "isCustom": true, // Whether this is a custom model
+ "provider": "OpenAI", // Model provider
+ "model": "whisper-1", // Model ID
+ "name": "whisper-1", // Model display name
+ "charsPointsPrice": 0, // n points/1k tokens
+ "type": "stt" // Model type
+ }
+}
+```
+
+## Model Testing
+
+FastGPT provides simple tests for each model type on the UI. You can run a quick check to verify models are working correctly — it sends an actual request using a template.
+
+
+
+## Special Integration Examples
+
+### Integrating Rerank Models
+
+Since OneAPI doesn't support Rerank models, they need to be configured separately. FastGPT's model configuration supports custom request URLs, allowing you to bypass OneAPI and send requests directly to providers. You can use this feature to integrate Rerank models.
+
+#### Using SiliconCloud's Online Models
+
+A free `bge-reranker-v2-m3` model is available.
+
+1. [Register a SiliconCloud account](https://cloud.siliconflow.cn/i/TR9Ym0c4)
+2. Go to the console and get your API key: https://cloud.siliconflow.cn/account/ak
+3. Open FastGPT model configuration and add a `BAAI/bge-reranker-v2-m3` rerank model (or modify the built-in one if it already exists).
+
+
+
+#### Self-Hosted Rerank Models
+
+[View the ReRank model deployment tutorial](/docs/introduction/development/custom-models/bge-rerank/)
+
+### Integrating Speech Recognition Models
+
+OneAPI's speech recognition interface cannot correctly identify non-Whisper models (it always defaults to whisper-1). To integrate other models, use a custom request URL. For example, to integrate SiliconCloud's `FunAudioLLM/SenseVoiceSmall` model:
+
+Click model edit:
+
+
+
+Enter SiliconCloud's URL: `https://api.siliconflow.cn/v1/audio/transcriptions`, and enter your SiliconCloud API Key.
+
+
+
+## Other Configuration Options
+
+### Custom Request URL
+
+Setting this value allows you to bypass OneAPI and send requests directly to the custom URL. You need to provide the complete request URL, for example:
+
+- LLM: [host]/v1/chat/completions
+- Embedding: [host]/v1/embeddings
+- STT: [host]/v1/audio/transcriptions
+- TTS: [host]/v1/audio/speech
+- Rerank: [host]/v1/rerank
+
+The custom request key is sent as a request header: `Authorization: Bearer xxx`.
+
+All interfaces follow OpenAI's model format. See the [OpenAI API documentation](https://platform.openai.com/docs/api-reference/introduction) for details.
+
+Since OpenAI doesn't provide a ReRank model, the Cohere format is used instead. [View request examples](/docs/introduction/development/faq/#how-to-check-model-issues)
+
+### Model Pricing Configuration
+
+Commercial version users can configure model pricing for account billing. The system supports two billing modes: total token billing and separate input/output token billing.
+
+For **separate input/output token billing**, fill in both `Model Input Price` and `Model Output Price`.
+For **total token billing**, fill in only `Model Combined Price`.
+
+## How to Submit Built-in Models
+
+Since models update frequently, the official team may not always keep up. If you can't find the built-in model you need, you can [submit an Issue](https://github.com/labring/FastGPT/issues) with the model name and official website, or directly [submit a PR](https://github.com/labring/FastGPT/pulls) with the model configuration.
+
+### Adding Model Providers
+
+To add a model provider, modify the following:
+
+1. FastGPT/packages/web/components/common/Icon/icons/model - Add the provider's SVG logo in this directory.
+2. In the FastGPT root directory, run `pnpm initIcon` to load the icon into the config file.
+3. FastGPT/packages/global/core/ai/provider.ts - Add the provider configuration in this file.
+
+### Adding Models
+
+In the `FastGPT-plugin` project, find the corresponding provider's config file under the `modules/model/provider` directory and add the model configuration. Make sure the `model` field is unique across all models. For field descriptions, see [Model Configuration Field Descriptions](/docs/introduction/development/modelconfig/intro/#configuration-via-config-file).
+
+## Legacy Model Configuration
+
+After configuring OneAPI, you need to manually add model configuration to the `config.json` file and restart.
+
+Since environment variables aren't ideal for complex configuration, FastGPT uses ConfigMap to mount config files. You can find the default config file at `projects/app/data/config.json`. See [docker-compose Quick Deployment](/docs/introduction/development/docker/) for how to mount config files.
+
+**In development**, copy the example config file `config.json` to `config.local.json` for it to take effect.
+**In Docker deployment**, modifying `config.json` requires restarting the container.
+
+The example config file below includes system parameters and model configurations:
+
+```json
+{
+ "feConfigs": {
+ "lafEnv": "https://laf.dev" // Laf environment. https://laf.run (Hangzhou Alibaba Cloud), or a private Laf environment. Latest Laf version required for Laf OpenAPI features.
+ },
+ "systemEnv": {
+ "vectorMaxProcess": 15, // Vector processing thread count
+ "qaMaxProcess": 15, // QA splitting thread count
+ "tokenWorkers": 50, // Token calculation worker count (persistent memory usage — don't set too high)
+ "hnswEfSearch": 100 // Vector search parameter (PG and OB only). Higher = more accurate but slower. 100 gives 99%+ accuracy.
+ },
+ "llmModels": [
+ {
+ "provider": "OpenAI", // Model provider, mainly for categorization display. Built-in providers: https://github.com/labring/FastGPT/blob/main/packages/global/core/ai/provider.ts. You can submit a PR for new providers, or use "Other"
+ "model": "gpt-5", // Model name (matches OneAPI channel model name)
+ "name": "gpt-5", // Model display name
+ "maxContext": 125000, // Max context
+ "maxResponse": 16000, // Max response
+ "quoteMaxToken": 120000, // Max quote content
+ "maxTemperature": 1.2, // Max temperature
+ "charsPointsPrice": 0, // n points/1k tokens (commercial version)
+ "censor": false, // Enable content moderation (commercial version)
+ "vision": true, // Supports image input
+ "datasetProcess": true, // Use as text understanding model (QA) — at least one must be true or knowledge base will error
+ "usedInClassify": true, // Use for question classification (at least one must be true)
+ "usedInExtractFields": true, // Use for content extraction (at least one must be true)
+ "usedInToolCall": true, // Use for tool calling (at least one must be true)
+ "toolChoice": true, // Supports tool choice (used in classification, extraction, tool calling)
+ "functionCall": false, // Supports function calling (used in classification, extraction, tool calling). toolChoice takes priority; if false, falls back to functionCall; if still false, falls back to prompt mode
+ "customCQPrompt": "", // Custom classification prompt (for models without tool/function call support)
+ "customExtractPrompt": "", // Custom content extraction prompt
+ "defaultSystemChatPrompt": "", // Default system prompt for conversations
+ "defaultConfig": {}, // Default config sent with API requests (e.g., GLM4's top_p)
+ "fieldMap": {} // Field mapping (e.g., o1 models need max_tokens mapped to max_completion_tokens)
+ },
+ {
+ "provider": "OpenAI",
+ "model": "gpt-4o",
+ "name": "gpt-4o",
+ "maxContext": 125000,
+ "maxResponse": 4000,
+ "quoteMaxToken": 120000,
+ "maxTemperature": 1.2,
+ "charsPointsPrice": 0,
+ "censor": false,
+ "vision": true,
+ "datasetProcess": true,
+ "usedInClassify": true,
+ "usedInExtractFields": true,
+ "usedInToolCall": true,
+ "toolChoice": true,
+ "functionCall": false,
+ "customCQPrompt": "",
+ "customExtractPrompt": "",
+ "defaultSystemChatPrompt": "",
+ "defaultConfig": {},
+ "fieldMap": {}
+ },
+ {
+ "provider": "OpenAI",
+ "model": "o1-mini",
+ "name": "o1-mini",
+ "maxContext": 125000,
+ "maxResponse": 65000,
+ "quoteMaxToken": 120000,
+ "maxTemperature": 1.2,
+ "charsPointsPrice": 0,
+ "censor": false,
+ "vision": false,
+ "datasetProcess": true,
+ "usedInClassify": true,
+ "usedInExtractFields": true,
+ "usedInToolCall": true,
+ "toolChoice": false,
+ "functionCall": false,
+ "customCQPrompt": "",
+ "customExtractPrompt": "",
+ "defaultSystemChatPrompt": "",
+ "defaultConfig": {
+ "temperature": 1,
+ "max_tokens": null,
+ "stream": false
+ }
+ },
+ {
+ "provider": "OpenAI",
+ "model": "o1-preview",
+ "name": "o1-preview",
+ "maxContext": 125000,
+ "maxResponse": 32000,
+ "quoteMaxToken": 120000,
+ "maxTemperature": 1.2,
+ "charsPointsPrice": 0,
+ "censor": false,
+ "vision": false,
+ "datasetProcess": true,
+ "usedInClassify": true,
+ "usedInExtractFields": true,
+ "usedInToolCall": true,
+ "toolChoice": false,
+ "functionCall": false,
+ "customCQPrompt": "",
+ "customExtractPrompt": "",
+ "defaultSystemChatPrompt": "",
+ "defaultConfig": {
+ "temperature": 1,
+ "max_tokens": null,
+ "stream": false
+ }
+ }
+ ],
+ "vectorModels": [
+ {
+ "provider": "OpenAI",
+ "model": "text-embedding-3-small",
+ "name": "text-embedding-3-small",
+ "charsPointsPrice": 0,
+ "defaultToken": 512,
+ "maxToken": 3000,
+ "weight": 100
+ },
+ {
+ "provider": "OpenAI",
+ "model": "text-embedding-3-large",
+ "name": "text-embedding-3-large",
+ "charsPointsPrice": 0,
+ "defaultToken": 512,
+ "maxToken": 3000,
+ "weight": 100,
+ "defaultConfig": {
+ "dimensions": 1024
+ }
+ },
+ {
+ "provider": "OpenAI",
+ "model": "text-embedding-ada-002", // Model name (matches OneAPI)
+ "name": "Embedding-2", // Model display name
+ "charsPointsPrice": 0, // n points/1k tokens
+ "defaultToken": 700, // Default token count for text splitting
+ "maxToken": 3000, // Max tokens
+ "weight": 100, // Training priority weight
+ "defaultConfig": {}, // Custom extra parameters. For example, to use embedding3-large, pass dimensions:1024 to return 1024-dimensional vectors (currently must be less than 1536 dimensions)
+ "dbConfig": {}, // Extra parameters for storage (needed for asymmetric vector models)
+ "queryConfig": {} // Extra parameters for querying
+ }
+ ],
+ "reRankModels": [],
+ "audioSpeechModels": [
+ {
+ "provider": "OpenAI",
+ "model": "tts-1",
+ "name": "OpenAI TTS1",
+ "charsPointsPrice": 0,
+ "voices": [
+ { "label": "Alloy", "value": "alloy", "bufferId": "openai-Alloy" },
+ { "label": "Echo", "value": "echo", "bufferId": "openai-Echo" },
+ { "label": "Fable", "value": "fable", "bufferId": "openai-Fable" },
+ { "label": "Onyx", "value": "onyx", "bufferId": "openai-Onyx" },
+ { "label": "Nova", "value": "nova", "bufferId": "openai-Nova" },
+ { "label": "Shimmer", "value": "shimmer", "bufferId": "openai-Shimmer" }
+ ]
+ }
+ ],
+ "whisperModel": {
+ "provider": "OpenAI",
+ "model": "whisper-1",
+ "name": "Whisper1",
+ "charsPointsPrice": 0
+ }
+}
+```
diff --git a/document/content/docs/introduction/development/modelConfig/meta.en.json b/document/content/docs/introduction/development/modelConfig/meta.en.json
new file mode 100644
index 0000000000..61a466af72
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/meta.en.json
@@ -0,0 +1,10 @@
+{
+ "title": "Model Configuration Solutions",
+ "pages": [
+ "ai-proxy",
+ "intro",
+ "one-api",
+ "siliconCloud",
+ "ppio"
+ ]
+}
diff --git a/document/content/docs/introduction/development/modelConfig/one-api.en.mdx b/document/content/docs/introduction/development/modelConfig/one-api.en.mdx
new file mode 100644
index 0000000000..e1dac24cf3
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/one-api.en.mdx
@@ -0,0 +1,124 @@
+---
+title: Connect Models via OneAPI
+description: Connect Models via OneAPI
+---
+
+FastGPT uses a model-separated deployment approach. FastGPT only supports the OpenAI model specification (models not available in OpenAI follow a more generic specification), and uses [One API](https://github.com/songquanpeng/one-api) to unify access to different model interfaces.
+
+[One API](https://github.com/songquanpeng/one-api) is an OpenAI API management and distribution system that provides access to all LLMs through the standard OpenAI API format, ready to use out of the box.
+
+## Relationship Between FastGPT and One API
+
+Think of One API as a gateway. The relationship between FastGPT and One API:
+
+
+
+## Deployment
+
+### Sealos Version
+
+* Beijing region: [Deploy OneAPI](https://hzh.sealos.run/?openapp=system-template%3FtemplateName%3Done-api)
+* Singapore region (GPT available): [Deploy OneAPI](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Done-api&uid=fnWRt09fZP)
+
+
+
+After deployment, open the OneAPI access link to proceed with the next steps.
+
+## OneAPI Basic Tutorial
+
+### Concepts
+
+1. Channels:
+ 1. In OneAPI, a channel corresponds to one `Api Key`, which can be from GPT, Microsoft, ChatGLM, ERNIE Bot, etc. A single `Api Key` can typically call multiple models from the same provider.
+ 2. One API routes requests to channels based on the `model` specified in the request. If a model maps to multiple channels, one is selected at random.
+2. Tokens: Credentials required to access One API. You only need this single credential to access all models configured in One API. In FastGPT, you only need to configure the `baseurl` and `token` from One API. Do not set any model scope restrictions on the token, as this can cause errors.
+
+
+
+### General Workflow
+
+1. Client sends a request to One API.
+2. One API matches the request to a channel based on the `model` parameter (must match exactly with the models in the channel). If multiple channels match, one is selected at random (same priority).
+3. One API sends the request to the actual endpoint.
+4. One API returns the result to the client.
+
+### 1. Log in to One API
+
+
+
+### 2. Create a Channel
+
+Add a channel in One API. Click [Add Base Models] directly — don't forget the embedding models.
+
+
+
+### 3. Create a Token
+
+| | |
+| --- | --- |
+|  |  |
+
+### 4. Adjust Account Balance
+
+One API defaults to $200 for the root user. You can edit this as needed.
+
+
+
+### 5. Update FastGPT Environment Variables
+
+With the One API token, FastGPT can send requests to One API by modifying the `baseurl` and `key`, and One API will forward them to the appropriate models. Update these two environment variables:
+
+```bash
+# Make sure to include v1. If on the same network, you can use the internal address.
+OPENAI_BASE_URL=https://xxxx.cloud.sealos.io/v1
+# The key below is the token provided by One API
+CHAT_API_KEY=sk-xxxxxx
+```
+
+## Connect Other Models
+
+**Example: Adding ERNIE Bot:**
+
+### 1. Add a Model Channel in OneAPI
+
+Select "Baidu Wenxin Qianfan" as the type.
+
+
+
+### 2. Update FastGPT Model Configuration
+
+Open FastGPT model configuration and enable the Wenxin Qianfan model. If the model is not built-in, you can add it manually through the "Add Model" option.
+
+
+
+## Other Provider Integration References
+
+This section covers tutorials for connecting various providers to OneAPI. After configuration, don't forget to enable the models in FastGPT's model configuration.
+
+### Alibaba Qwen (Tongyi Qianwen)
+
+Qwen is now compatible with the GPT format and can be connected directly using the OpenAI type. As shown below, select `OpenAI` as the type and fill in the Alibaba Cloud proxy address.
+
+You can directly use Alibaba Cloud's language models and the `text-embedding-v3` embedding model (confirmed to be normalized and ready to use).
+
+
+
+### SiliconCloud — Open Source Model Collection
+
+[SiliconCloud](https://cloud.siliconflow.cn/i/TR9Ym0c4) is a platform specializing in open source model inference with its own acceleration engine. It offers a wide range of models, making it ideal for low-cost testing of open source models. Integration steps:
+
+1. [Register a SiliconCloud account](https://cloud.siliconflow.cn/i/TR9Ym0c4)
+2. Go to the console and get your API key: https://cloud.siliconflow.cn/account/ak
+3. Add a new OneAPI channel, select `OpenAI` as the type, set the proxy to `https://api.siliconflow.cn`, and use the API key from step 2.
+
+
+
+Since OneAPI doesn't include SiliconCloud model names by default, you can enter custom model names. Here's how to find the model names:
+
+1. Open the [SiliconCloud model list](https://siliconflow.cn/zh-cn/models)
+2. Click on a model to open its details.
+3. Copy the model name into OneAPI.
+
+| | | |
+| --- | --- | --- |
+|  | |  |
diff --git a/document/content/docs/introduction/development/modelConfig/ppio.en.mdx b/document/content/docs/introduction/development/modelConfig/ppio.en.mdx
new file mode 100644
index 0000000000..228b59127a
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/ppio.en.mdx
@@ -0,0 +1,139 @@
+---
+title: Connect Models via PPIO LLM API
+description: Connect Models via PPIO LLM API
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+FastGPT can also connect models through the PPIO LLM API.
+
+
+ The following content is adapted from [FastGPT Integration with PPIO LLM
+ API](https://ppinfra.com/docs/third-party/fastgpt-use) and may not always be up to date.
+
+
+FastGPT is a platform that simplifies the entire AI development, deployment, and usage workflow into visual operations. Developers don't need to dive deep into algorithms, and users don't need to master complex technologies — it turns AI into an easy-to-use tool through a one-stop service.
+
+PPIO Cloud provides simple and easy-to-use API interfaces that allow developers to easily call models like DeepSeek.
+
+- For developers: No need to restructure your architecture. Complete integration for all scenarios from text generation to decision reasoning with just 3 interfaces — design AI workflows like building blocks.
+- For the ecosystem: Automatically adapts resource requirements from small applications to enterprise systems, letting intelligence grow naturally with your business.
+
+The tutorial below provides a complete integration guide (including key configuration) to help you quickly connect FastGPT with the PPIO API.
+
+## 1. Prerequisites
+
+(1) Get the API endpoint
+
+Fixed at: `https://api.ppinfra.com/v3/openai/chat/completions`.
+
+(2) Get the API Key
+
+Log in to the PPIO Cloud console [API Key Management](https://www.ppinfra.com/settings/key-management) page and click the create button.
+Use invitation code [VOJL20] when registering to receive a 50 yuan voucher.
+
+
+
+(3) Generate and save the API Key
+
+
+ Keys are stored encrypted on the server. Please save your key when it is generated. If lost, you can delete it and create a new one in the console.
+
+
+
+
+
+(4) Get the model IDs you need
+
+DeepSeek series:
+
+- DeepSeek R1: deepseek/deepseek-r1/community
+
+- DeepSeek V3: deepseek/deepseek-v3/community
+
+For other model IDs, max context, and pricing, see: [Model List](https://ppinfra.com/model-api/pricing)
+
+## 2. Deploy the Latest FastGPT to Your Local Environment
+
+
+ Please use version v4.8.22 or above. Deployment reference: [Deploy FastGPT](/docs/introduction/development/intro/)
+
+
+## 3. Model Configuration (Choose One of the Two Methods Below)
+
+(1) Connect PPIO models via OneAPI: Refer to the OneAPI documentation to update FastGPT environment variables. After generating a token in One API, FastGPT can send requests to One API by modifying the baseurl and key, and One API will forward them to the appropriate models. Update these two environment variables (make sure to include v1; if on the same network, you can use the internal address):
+
+OPENAI_BASE_URL= http://OneAPI-IP:OneAPI-PORT/v1
+
+The key below is the token provided by One API: CHAT_API_KEY=sk-UyVQcpQWMU7ChTVl74B562C28e3c46Fe8f16E6D8AeF8736e
+
+- After restarting FastGPT, select PPIO Cloud in the model providers as shown below:
+
+
+
+- Test connectivity
+ Using DeepSeek as an example, select deepseek/deepseek-r1/community in the model list, click the position marked 2 in the image to test connectivity. A green success indicator confirms the connection is working and you can proceed with configuring conversations.
+
+
+(2) Connect PPIO models without OneAPI
+
+Select PPIO Cloud in the model providers as shown below:
+
+
+
+- Configure the model: Enter `https://api.ppinfra.com/v3/openai/chat/completions` in the custom request URL field.
+
+
+
+
+- Test connectivity
+
+
+A green success indicator confirms the connection is working and you can proceed with configuring conversations.
+
+## 4. Configure Conversations
+
+(1) Create a new workspace
+
+
+(2) Start chatting
+
+
+## PPIO New User Benefits
+
+After completing the tutorial configuration steps, you'll unlock two benefits: 1. Enjoy the combination of PPIO's high-speed channel with FastGPT's capabilities; 2. Activate the "New User Referral Reward" — invite friends to register using your exclusive invitation code, and both you and your friend will receive a 50 yuan voucher to boost your AI tool efficiency!
+
+New user exclusive: Register now with invitation code [VOJL20] and receive a 50 yuan voucher instantly!
diff --git a/document/content/docs/introduction/development/modelConfig/siliconCloud.en.mdx b/document/content/docs/introduction/development/modelConfig/siliconCloud.en.mdx
new file mode 100644
index 0000000000..37f4709579
--- /dev/null
+++ b/document/content/docs/introduction/development/modelConfig/siliconCloud.en.mdx
@@ -0,0 +1,89 @@
+---
+title: Try Open Source Models with SiliconCloud
+description: Try Open Source Models with SiliconCloud
+---
+
+[SiliconCloud](https://cloud.siliconflow.cn/i/TR9Ym0c4) is a platform focused on providing open source model inference, with its own acceleration engine. It helps users test and use open source models quickly at low cost. In our experience, their models offer solid speed and stability, with a wide variety covering language, embedding, reranking, TTS, STT, image generation, and video generation models — meeting all model requirements in FastGPT.
+
+If you want to use SiliconCloud for only some models, see [OneAPI Integration with SiliconCloud](/docs/introduction/development/modelconfig/one-api/#siliconcloud--open-source-model-collection).
+
+This guide covers deploying FastGPT entirely with SiliconCloud models.
+
+## 1. Register a SiliconCloud Account
+
+1. [Register a SiliconCloud account](https://cloud.siliconflow.cn/i/TR9Ym0c4)
+2. Go to the console and get your API key: https://cloud.siliconflow.cn/account/ak
+
+## 2. Update FastGPT Environment Variables
+
+```bash
+OPENAI_BASE_URL=https://api.siliconflow.cn/v1
+# Enter the API Key from the SiliconCloud console
+CHAT_API_KEY=sk-xxxxxx
+```
+
+## 3. Update FastGPT Model Configuration
+
+The system includes a few SiliconCloud models by default for quick testing. You can add more models manually if needed.
+
+Here we enable `Qwen2.5 72b` for both text and vision models; `bge-m3` as the embedding model; `bge-reranker-v2-m3` as the reranking model; `fish-speech-1.5` as the TTS model; and `SenseVoiceSmall` as the STT model.
+
+
+
+## 4. Testing
+
+### Test Chat and Image Recognition
+
+Create a simple app, select the corresponding model, enable image upload, and test:
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+The 72B model performs quite fast. Without several 4090 GPUs locally, just the output alone would take around 30 seconds — not to mention the environment setup.
+
+### Test Knowledge Base Import and Q&A
+
+Create a knowledge base (since only one embedding model is configured, the embedding model selector won't appear on the page):
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+Import a local file — just select the file and click through the steps. 79 indexes were completed in about 20 seconds. Now let's test knowledge base Q&A.
+
+Go back to the app we just created, select the knowledge base, adjust the parameters, and start a conversation:
+
+| | | |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+|  |  |  |
+
+After the conversation, click the citation at the bottom to view citation details, including retrieval and reranking scores:
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+### Test Text-to-Speech
+
+In the same app, find "Voice Playback" in the left sidebar configuration. Click to select a voice model from the popup and preview it:
+
+
+
+### Test Speech-to-Text
+
+In the same app, find "Voice Input" in the left sidebar configuration. Click to enable voice input from the popup:
+
+
+
+Once enabled, a microphone icon appears in the chat input box. Click it to start voice input:
+
+| | |
+| ------------------------------- | ------------------------------- |
+|  |  |
+
+## Summary
+
+If you want to quickly try open source models or get started with FastGPT without applying for API keys from multiple providers, SiliconCloud is a great option for a fast start.
+
+If you plan to self-host models and FastGPT in the future, you can use SiliconCloud for initial testing and validation, then proceed with hardware procurement later — reducing POC time and cost.
diff --git a/document/content/docs/introduction/development/object-storage.en.mdx b/document/content/docs/introduction/development/object-storage.en.mdx
new file mode 100644
index 0000000000..1290791205
--- /dev/null
+++ b/document/content/docs/introduction/development/object-storage.en.mdx
@@ -0,0 +1,98 @@
+---
+title: Object Storage Configuration & Common Issues
+description: How to configure and connect to various object storage providers via environment variables, and common configuration issues
+---
+
+import { Alert } from '@/components/docs/Alert';
+import FastGPTLink from '@/components/docs/linkFastGPT';
+
+## Object Storage Configuration
+
+This guide covers environment variable configuration for object storage providers supported by FastGPT, including self-hosted MinIO, AWS S3, Alibaba Cloud OSS, and Tencent Cloud COS.
+
+### Common Required Environment Variables
+
+> - Temporary credential authentication (e.g., STS) is not supported. Ensure service security on your own.
+> - Private bucket reuse is not supported. If you set the private and public bucket names to the same value, ensure the bucket policy is at least **public read, private write**.
+
+- `STORAGE_VENDOR` Enum value. Options: `minio`, `aws-s3`, `oss`, `cos`.
+- `STORAGE_REGION` Region where the object storage service is located, e.g., `us-east-1`. Refer to your provider's region list. For self-hosted MinIO, any value works.
+- `STORAGE_ACCESS_KEY_ID` Access Key ID for the service credentials
+- `STORAGE_SECRET_ACCESS_KEY` Secret Access Key for the service credentials
+- `STORAGE_PUBLIC_BUCKET` FastGPT public resource bucket name
+- `STORAGE_PRIVATE_BUCKET` FastGPT private resource bucket name
+
+### Self-Hosted MinIO and AWS S3
+
+> MinIO has strong AWS S3 protocol support, so MinIO and AWS S3 configurations are nearly identical — differences come from provider-specific or self-hosted requirements.
+> In theory, any object storage with S3 protocol support comparable to MinIO will work, such as SeaweedFS, RustFS, etc.
+
+- `STORAGE_S3_ENDPOINT` Internal connection address. Can be a container ID, e.g., `http://fastgpt-minio:9000`
+- `STORAGE_EXTERNAL_ENDPOINT` An address accessible by both **server** and **client** to reach the bucket. Use a fixed host IP or domain name — don't use `127.0.0.1` or `localhost` (containers can't access loopback addresses). This address is used when generating signed file upload URLs.
+- `STORAGE_S3_FORCE_PATH_STYLE` [Optional] Virtual-hosted-style or path-style routing. If vendor is `minio`, this is fixed to `true`.
+- `STORAGE_S3_MAX_RETRIES` [Optional] Maximum request retry attempts. Default: 3
+
+**Complete Example**
+
+> If using Sealos object storage, set `STORAGE_VENDOR` to `aws-s3`
+
+```dotenv
+STORAGE_VENDOR=minio
+STORAGE_REGION=us-east-1
+STORAGE_ACCESS_KEY_ID=your_access_key
+STORAGE_SECRET_ACCESS_KEY=your_secret_key
+STORAGE_PUBLIC_BUCKET=fastgpt-public
+STORAGE_PRIVATE_BUCKET=fastgpt-private
+STORAGE_EXTERNAL_ENDPOINT=http://127.0.0.1:9000
+STORAGE_S3_ENDPOINT=http://127.0.0.1:9000
+STORAGE_S3_FORCE_PATH_STYLE=true
+STORAGE_S3_MAX_RETRIES=3
+```
+
+### Alibaba Cloud OSS
+
+> - [CORS Configuration](https://help.aliyun.com/zh/oss/user-guide/configure-cross-origin-resource-sharing/?spm=5176.8466032.console-base_help.dexternal.1bcd1450Wau6J6#b58400ec36rqf)
+
+- `STORAGE_OSS_ENDPOINT` Alibaba Cloud OSS hostname. Default is usually `{region}.aliyuncs.com`, e.g., `oss-cn-hangzhou.aliyuncs.com`. If using a custom domain, enter it here, e.g., `your-domain.com`
+- `STORAGE_OSS_CNAME` Whether custom domain is enabled
+- `STORAGE_OSS_SECURE` Whether TLS is enabled. Disable if your domain doesn't have a certificate.
+- `STORAGE_OSS_INTERNAL` [Optional] Whether to use internal network access. Enable if your service is also on Alibaba Cloud to save bandwidth. Default: disabled
+
+**Complete Example**
+
+```dotenv
+STORAGE_VENDOR=oss
+STORAGE_REGION=oss-cn-hangzhou
+STORAGE_ACCESS_KEY_ID=your_access_key
+STORAGE_SECRET_ACCESS_KEY=your_secret_key
+STORAGE_PUBLIC_BUCKET=fastgpt-public
+STORAGE_PRIVATE_BUCKET=fastgpt-private
+STORAGE_OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
+STORAGE_OSS_CNAME=false
+STORAGE_OSS_SECURE=false
+STORAGE_OSS_INTERNAL=false
+```
+
+### Tencent Cloud COS
+
+> - [CORS Configuration](https://cloud.tencent.com/document/product/436/13318)
+
+- `STORAGE_COS_PROTOCOL` Options: `https:`, `http:` — don't forget the `:`. If your custom domain doesn't have a certificate, don't use `https:`
+- `STORAGE_COS_USE_ACCELERATE` [Optional] Enable global acceleration domain. Default: false. If true, the bucket must have global acceleration enabled.
+- `STORAGE_COS_CNAME_DOMAIN` [Optional] Custom domain, e.g., `your-domain.com`
+- `STORAGE_COS_PROXY` [Optional] Proxy server, e.g., `http://localhost:7897`
+
+**Complete Example**
+
+```dotenv
+STORAGE_VENDOR=cos
+STORAGE_REGION=ap-shanghai
+STORAGE_ACCESS_KEY_ID=your_access_key
+STORAGE_SECRET_ACCESS_KEY=your_secret_key
+STORAGE_PUBLIC_BUCKET=fastgpt-public
+STORAGE_PRIVATE_BUCKET=fastgpt-private
+STORAGE_COS_PROTOCOL=http:
+STORAGE_COS_USE_ACCELERATE=false
+STORAGE_COS_CNAME_DOMAIN=
+STORAGE_COS_PROXY=
+```
diff --git a/document/content/docs/introduction/development/proxy/cloudflare.en.mdx b/document/content/docs/introduction/development/proxy/cloudflare.en.mdx
new file mode 100644
index 0000000000..ee0ca6c045
--- /dev/null
+++ b/document/content/docs/introduction/development/proxy/cloudflare.en.mdx
@@ -0,0 +1,50 @@
+---
+title: Cloudflare Worker Proxy
+description: Use Cloudflare Worker as a Proxy
+---
+
+[Reference tutorial by "不做了睡觉"](https://gravel-twister-d32.notion.site/FastGPT-API-ba7bb261d5fd4fd9bbb2f0607dacdc9e)
+
+**Workers configuration file**
+
+```js
+const TELEGRAPH_URL = 'https://api.openai.com';
+
+addEventListener('fetch', (event) => {
+ event.respondWith(handleRequest(event.request));
+});
+
+async function handleRequest(request) {
+ // Security check
+ if (request.headers.get('auth') !== 'auth_code') {
+ return new Response('UnAuthorization', { status: 403 });
+ }
+
+ const url = new URL(request.url);
+ url.host = TELEGRAPH_URL.replace(/^https?:\/\//, '');
+
+ const modifiedRequest = new Request(url.toString(), {
+ headers: request.headers,
+ method: request.method,
+ body: request.body,
+ redirect: 'follow'
+ });
+
+ const response = await fetch(modifiedRequest);
+ const modifiedResponse = new Response(response.body, response);
+
+ // Add CORS headers
+ modifiedResponse.headers.set('Access-Control-Allow-Origin', '*');
+
+ return modifiedResponse;
+}
+```
+
+**Update FastGPT environment variables**
+
+> Don't forget to include v1!
+
+```bash
+OPENAI_BASE_URL=https://xxxxxx/v1
+OPENAI_BASE_URL_AUTH=auth_code
+```
diff --git a/document/content/docs/introduction/development/proxy/http_proxy.en.mdx b/document/content/docs/introduction/development/proxy/http_proxy.en.mdx
new file mode 100644
index 0000000000..29fa2b5ec4
--- /dev/null
+++ b/document/content/docs/introduction/development/proxy/http_proxy.en.mdx
@@ -0,0 +1,42 @@
+---
+title: HTTP Proxy
+description: Use an HTTP Proxy for Routing
+---
+
+If you have a proxy tool (like [Clash](https://github.com/Dreamacro/clash) or [sing-box](https://github.com/SagerNet/sing-box)), you can use an HTTP proxy to access OpenAI. Just add these two environment variables:
+
+```bash
+AXIOS_PROXY_HOST=
+AXIOS_PROXY_PORT=
+```
+
+Using Clash as an example, it's recommended to route only `api.openai.com` through the proxy and direct-connect everything else. Example configuration:
+
+```yaml
+mixed-port: 7890
+allow-lan: false
+bind-address: '*'
+mode: rule
+log-level: warning
+dns:
+ enable: true
+ ipv6: false
+ nameserver:
+ - 8.8.8.8
+ - 8.8.4.4
+ cache-size: 400
+proxies:
+ -
+proxy-groups:
+ - { name: '♻️ Auto Select', type: url-test, proxies: [HK-V01×1.5], url: 'https://api.openai.com', interval: 3600}
+rules:
+ - 'DOMAIN-SUFFIX,api.openai.com,♻️ Auto Select'
+ - 'MATCH,DIRECT'
+```
+
+Then add these two environment variables to FastGPT:
+
+```bash
+AXIOS_PROXY_HOST=127.0.0.1
+AXIOS_PROXY_PORT=7890
+```
diff --git a/document/content/docs/introduction/development/proxy/meta.en.json b/document/content/docs/introduction/development/proxy/meta.en.json
new file mode 100644
index 0000000000..200bdc9d85
--- /dev/null
+++ b/document/content/docs/introduction/development/proxy/meta.en.json
@@ -0,0 +1,9 @@
+{
+ "title": "Proxy Solutions",
+ "description": "FastGPT private deployment proxy solutions",
+ "pages": [
+ "nginx",
+ "http_proxy",
+ "cloudflare"
+ ]
+}
diff --git a/document/content/docs/introduction/development/proxy/nginx.en.mdx b/document/content/docs/introduction/development/proxy/nginx.en.mdx
new file mode 100644
index 0000000000..58ac028b0e
--- /dev/null
+++ b/document/content/docs/introduction/development/proxy/nginx.en.mdx
@@ -0,0 +1,101 @@
+---
+title: Nginx Proxy
+description: Deploy Nginx on Sealos as a Proxy
+---
+
+## Log in to Sealos
+
+[Sealos](https://cloud.sealos.io?uid=fnWRt09fZP)
+
+## Create an Application
+
+Open "App Launchpad" and click "New Application":
+
+
+
+
+### Fill in Basic Configuration
+
+Make sure to enable external access and copy the provided external access address.
+
+
+
+### Add Configuration File
+
+1. Copy the configuration below. Replace the content after `server_name` with the external access address from step 2.
+
+ ```nginx
+ user nginx;
+ worker_processes auto;
+ worker_rlimit_nofile 51200;
+
+ events {
+ worker_connections 1024;
+ }
+
+ http {
+ resolver 8.8.8.8;
+ proxy_ssl_server_name on;
+
+ access_log off;
+ server_names_hash_bucket_size 512;
+ client_header_buffer_size 64k;
+ large_client_header_buffers 4 64k;
+ client_max_body_size 50M;
+
+ proxy_connect_timeout 240s;
+ proxy_read_timeout 240s;
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+
+ server {
+ listen 80;
+ server_name tgohwtdlrmer.cloud.sealos.io; # Replace with the Sealos external address
+
+ location ~ /openai/(.*) {
+ proxy_pass https://api.openai.com/$1$is_args$args;
+ proxy_set_header Host api.openai.com;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ # For streaming responses
+ proxy_set_header Connection '';
+ proxy_http_version 1.1;
+ chunked_transfer_encoding off;
+ proxy_buffering off;
+ proxy_cache off;
+ # For regular responses
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ }
+ }
+ }
+ ```
+
+2. Open Advanced Configuration.
+3. Click "Add Config File".
+4. File name: `/etc/nginx/nginx.conf`.
+5. File value: the code you just copied.
+6. Click Confirm.
+
+ 
+
+### Deploy the Application
+
+After filling everything in, click "Deploy" in the upper right corner to complete deployment.
+
+## Update FastGPT Environment Variables
+
+1. Go to the deployed app's details and copy the external address.
+
+ > Note: This is an API address — opening it directly in a browser won't work. To verify, visit: `*.cloud.sealos.io/openai/api`. If you see `Invalid URL (GET /api)`, it's working correctly.
+
+ 
+
+2. Update the environment variable (this is FastGPT's environment variable, not Sealos'):
+
+ ```bash
+ OPENAI_BASE_URL=https://tgohwtdlrmer.cloud.sealos.io/openai/v1
+ ```
+
+**Done!**
diff --git a/document/content/docs/introduction/development/sealos.en.mdx b/document/content/docs/introduction/development/sealos.en.mdx
new file mode 100644
index 0000000000..1e77a5ea4a
--- /dev/null
+++ b/document/content/docs/introduction/development/sealos.en.mdx
@@ -0,0 +1,187 @@
+---
+title: Deploy with Sealos
+description: One-click FastGPT deployment using Sealos
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Deployment Architecture
+
+
+
+## Multi-Model Support
+
+FastGPT uses the one-api project to manage model pools, supporting OpenAI, Azure, mainstream domestic models, and local models.
+
+See: [Quick OneAPI Deployment on Sealos](/docs/introduction/development/modelconfig/one-api)
+
+## One-Click Deployment
+
+With Sealos, you don't need to purchase servers or domains. It supports high concurrency and dynamic scaling, and databases use KubeBlocks with far better I/O performance than simple Docker container deployments. Choose a region below based on your needs.
+
+### Singapore Region
+
+Singapore servers are overseas with direct access to OpenAI, but users in mainland China need a VPN. International pricing is slightly higher. Click below to deploy 👇
+
+
+
+
+
+### Beijing Region
+
+The Beijing region is hosted by Volcano Engine. Users in mainland China get stable access, but it can't reach OpenAI or other overseas services. Pricing is about 1/4 of the Singapore region. Click below to deploy 👇
+
+
+
+
+
+### 1. Start Deployment
+
+Since databases need to be deployed, wait 2–4 minutes after deployment before accessing. The default uses minimal resources, so the first access may be slow.
+
+Follow the prompts to enter `root_password` and the `openai`/`oneapi` address and key.
+
+
+
+After clicking deploy, you'll be redirected to the app management page. Click the details button on the right side of the `fastgpt` main app (named fastgpt-xxxx), as shown below.
+
+
+
+After clicking details, you'll see the FastGPT deployment management page. Click the link in the external access address to open the FastGPT service.
+
+To bind a custom domain or modify deployment parameters, click **Change** in the top right and follow Sealos' instructions.
+
+
+
+### 2. Log In
+
+Username: `root`
+
+Password: the `root_password` you set during one-click deployment
+
+### 3. Configure Models
+
+### 4. Configure Models
+
+You must configure at least one model set, or the system won't work properly.
+
+[View model configuration tutorial](./modelConfig/intro/)
+
+## Pricing
+
+Sealos uses pay-as-you-go billing based on allocated CPU, memory, and disk. For specific pricing, open the **Cost Center** in the Sealos control panel.
+
+## Using Sealos
+
+### Overview
+
+FastGPT Commercial Edition includes 2 apps (fastgpt, fastgpt-plus) and 2 databases. When using multiple API keys, install OneAPI (1 app and 1 database), totaling 3 apps and 3 databases.
+
+
+
+Click details on the right to view each app's information.
+
+### Modifying Config Files and Environment Variables
+
+In Sealos, open **App Launchpad** to see deployed FastGPT apps, and open **Database** to see corresponding databases.
+
+In **App Launchpad**, select FastGPT, click **Change**, and you'll see environment variables and config files.
+
+
+
+
+ On Sealos, FastGPT runs 1 service and 2 databases. When pausing or deleting, handle the databases together. (You can start them during the day and pause at night to save costs.)
+
+
+### How to Update/Upgrade FastGPT
+
+[Upgrade script documentation](./upgrading/) — read the docs first to determine which version to upgrade to. Do not skip versions.
+
+For example, if you're on version 4.5 and want to upgrade to 4.5.1: change the image version to v4.5.1, run the upgrade script, wait for completion, then continue upgrading. If the target version doesn't require initialization, skip it.
+
+Upgrade steps:
+
+1. Check the [update documentation](./upgrading/index/) to confirm the target version — avoid skipping versions.
+2. Open Sealos app management
+3. There are 2 apps: fastgpt, fastgpt-pro
+4. Click the 3 dots on the right side of the app, then **Change**. Or click details, then **Change** in the top right.
+5. Modify the image version number
+
+
+
+6. Click **Change/Restart** to automatically pull the latest image and update
+7. Run the initialization script for the corresponding version (if applicable)
+
+### How to Get the FastGPT Access Link
+
+Open the corresponding app and click the external access address.
+
+
+
+### Configure a Custom Domain
+
+Click **Change** on the app -> **Custom Domain** -> enter domain -> configure domain CNAME -> confirm -> confirm change.
+
+
+
+### How to Modify Config Files
+
+Open Sealos app management -> find the app -> **Change** -> scroll down to advanced configuration where you'll find config files -> add new or click an existing config file to edit -> click confirm change in the top right.
+
+
+
+[Config file reference](./configuration/)
+
+### Modify Site Name and Favicon
+
+Add these environment variables to the app:
+
+```
+SYSTEM_NAME=FastGPT
+SYSTEM_DESCRIPTION=
+SYSTEM_FAVICON=/favicon.ico
+HOME_URL=/dashboard/agent
+```
+
+SYSTEM_FAVICON can be a URL.
+
+
+
+### Mount a Logo
+
+Currently, the browser logo can't be fully replaced — only SVG is supported. Full replacement will be available after visual customization is implemented.
+
+Add a mounted file with path: `/app/projects/app/public/icon/logo.svg`, with the SVG content as the value.
+
+
+
+
+
+### Commercial Edition Config File
+
+```
+{
+ "license": "",
+ "system": {
+ "title": "" // System name
+ }
+}
+```
+
+### Using OneAPI
+
+[See OneAPI usage guide](/docs/introduction/development/modelconfig/one-api/)
diff --git a/document/content/docs/introduction/development/signoz.en.mdx b/document/content/docs/introduction/development/signoz.en.mdx
new file mode 100644
index 0000000000..a2f057d39d
--- /dev/null
+++ b/document/content/docs/introduction/development/signoz.en.mdx
@@ -0,0 +1,81 @@
+---
+title: Integrate SigNoz Service Monitoring
+description: FastGPT integration with SigNoz service monitoring
+---
+
+## Introduction
+
+[SigNoz](https://signoz.io/) is an open-source Application Performance Monitoring (APM) and observability platform that provides comprehensive service monitoring for FastGPT. Built on the OpenTelemetry standard, it collects, processes, and visualizes telemetry data from distributed systems, including tracing, metrics, and logging.
+
+**Key Features:**
+
+- **Distributed Tracing**: Track the complete call chain of user requests across FastGPT services
+- **Performance Monitoring**: Monitor key metrics like API response times and throughput
+- **Error Tracking**: Automatically capture and record system exceptions for troubleshooting
+- **Log Aggregation**: Centrally collect and manage application logs with structured query support
+- **Real-time Alerts**: Set alert rules based on metric thresholds to detect anomalies early
+
+## Deploy SigNoz
+
+You can use [SigNoz](https://signoz.io/) cloud service or self-host it. Here's how to quickly deploy SigNoz on Sealos.
+
+1. Click the card below to deploy SigNoz with one click.
+
+[](https://hzh.sealos.run/?uid=fnWRt09fZP&openapp=system-template%3FtemplateName%3Dsignoz)
+
+2. Enable external access for SigNoz
+
+After deployment, click **Details** in P1 to open the app details page, then click **Change** in the top right and enable the external address for port 4318 (skip this step if using internal network).
+
+| P1 | P2 | P3 |
+| --- | --- | --- |
+|  |  |  |
+
+3. Get the SigNoz access address
+
+After the change completes, wait for the public address to be ready, copy it, and enter it in FastGPT. If using internal network, copy the internal address for port 4318 directly.
+
+
+
+## Configure FastGPT
+
+1. Update FastGPT environment variables
+
+**Log level options**: `trace` | `debug` | `info` | `warning` | `error` | `fatal`
+
+```dotenv
+LOG_ENABLE_CONSOLE=true # Enable console logging
+LOG_CONSOLE_LEVEL=debug # Minimum log level for console output
+LOG_ENABLE_OTEL=true # Enable OTEL log collection
+LOG_OTEL_LEVEL=info # Minimum log level for OTEL collection
+LOG_OTEL_SERVICE_NAME=fastgpt-client # Service name passed to the OTLP collector
+LOG_OTEL_URL=http://localhost:4318/v1/logs # Your OTLP collector address — don't omit /v1/logs
+```
+
+2. Restart FastGPT
+
+## Verify the Setup
+
+Go back to the Sealos app management list, open the SigNoz frontend project, and access its public address to open the dashboard.
+
+| | |
+| --- | --- |
+|  |  |
+
+First-time access requires creating an account (data is stored in the local database) — fill in anything.
+
+
+
+After logging in, if `logs` and `traces` are lit up in the COMPLETED steps on the right side, the configuration is successful.
+
+
+
+
+
+## Notes
+
+1. Adjust log retention period
+
+SigNoz monitoring is very disk-intensive. First, avoid storing FastGPT debug logs in SigNoz. Also consider setting the log retention period to 7 days. If SigNoz data stops growing while memory keeps increasing, the disk is full — expand capacity.
+
+
diff --git a/document/content/docs/introduction/guide/DialogBoxes/htmlRendering.en.mdx b/document/content/docs/introduction/guide/DialogBoxes/htmlRendering.en.mdx
new file mode 100644
index 0000000000..b4c9c6d9d8
--- /dev/null
+++ b/document/content/docs/introduction/guide/DialogBoxes/htmlRendering.en.mdx
@@ -0,0 +1,52 @@
+---
+title: Dialog Boxes & HTML Rendering
+description: How to embed HTML code blocks in FastGPT via Markdown, with fullscreen, source code toggle, and other interactive features
+---
+
+| Source Mode | Preview Mode | Fullscreen Mode |
+| --- | --- | --- |
+|  |  |  |
+
+### 1. Design Background
+
+While Markdown natively supports embedded HTML tags, many platforms restrict HTML rendering for security reasons -- especially for dynamic content, interactive elements, and external resources. These restrictions limit flexibility when authoring complex documents that need embedded HTML. To address this, FastGPT uses `iframe` to embed and render HTML content, combined with the `sandbox` attribute to ensure safe rendering.
+
+### 2. Feature Overview
+
+This module extends FastGPT's Markdown rendering to support embedded HTML content. Since rendering uses an iframe, the content height cannot be determined automatically, so FastGPT sets a fixed height for the iframe. JavaScript execution within the HTML is not supported.
+
+### 3. Technical Implementation
+
+This module implements HTML rendering and interactivity through:
+
+- **Component Design:** The module displays HTML content via `iframe`-type code blocks using a custom `IframeBlock` component. The `sandbox` attribute ensures embedded content security by restricting behaviors like script execution and form submissions. Helper functions integrate with the Markdown renderer to handle `iframe`-embedded HTML content.
+- **Security Mechanism:** The `iframe`'s `sandbox` attribute and `referrerPolicy` prevent potential security risks. The `sandbox` attribute provides fine-grained control, allowing specific capabilities (scripts, forms, popups, etc.) to run in a restricted environment so rendered HTML cannot compromise the system.
+- **Display & Interaction:** Users can switch between display modes (fullscreen, preview, source code) for flexible viewing and control of embedded HTML. The `iframe` adapts to the parent container's width while ensuring content displays properly.
+
+### 4. How to Use
+
+Simply use a Markdown code block with the language set to `html`. For example:
+
+```md
+```html
+
+
+
+
+
+
+ Welcome to FastGPT
+
+
+
+
+
+```
+```
diff --git a/document/content/docs/introduction/guide/DialogBoxes/meta.en.json b/document/content/docs/introduction/guide/DialogBoxes/meta.en.json
new file mode 100644
index 0000000000..2059318b19
--- /dev/null
+++ b/document/content/docs/introduction/guide/DialogBoxes/meta.en.json
@@ -0,0 +1,8 @@
+{
+ "title": "Dialog Boxes",
+ "description": "Dialog box components that support multiple interaction methods to enhance user experience in applications.",
+ "pages": [
+ "htmlRendering",
+ "quoteList"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/DialogBoxes/quoteList.en.mdx b/document/content/docs/introduction/guide/DialogBoxes/quoteList.en.mdx
new file mode 100644
index 0000000000..d4c7a3155a
--- /dev/null
+++ b/document/content/docs/introduction/guide/DialogBoxes/quoteList.en.mdx
@@ -0,0 +1,82 @@
+---
+title: Knowledge Base Chunk Reader
+description: FastGPT Chunk Reader feature overview
+---
+
+In enterprise AI deployments, the accuracy and transparency of document citations have always been a key concern. The Knowledge Base Chunk Reader introduced in FastGPT 4.9.1 solves this pain point, making AI citations no longer a "black box."
+
+# Why a Chunk Reader?
+
+In traditional AI conversations, when a model cites content from an enterprise knowledge base, users typically only see the cited fragment without the full context. This makes content verification and deeper understanding difficult. The Chunk Reader lets users view the complete source document directly within the conversation and jump to the exact citation location, bringing true explainability to AI citations.
+
+## Limitations of Traditional Citations
+
+Previously, after uploading documents to the knowledge base, traditional citations only displayed the matched chunks with no way to see the surrounding context:
+
+| Question | Citation |
+| --- | --- |
+|  |  |
+
+## FastGPT Chunk Reader: Precise Positioning, Seamless Reading
+
+With FastGPT's Chunk Reader, the same knowledge base content and questions are presented in a fundamentally better way:
+
+
+
+When AI cites knowledge base content, click the citation link to open a popup showing the full original text with the cited passage clearly highlighted. This ensures traceability while providing a convenient reading experience.
+
+# Core Features
+
+## Full-Text Display & Positioning
+
+The Chunk Reader lets users see exactly where AI responses draw from in the knowledge base.
+
+In the conversation interface, when AI cites knowledge base content, source information appears below the reply. Click any citation link to open a popup with the complete original text and the cited passage highlighted.
+
+This design ensures answer traceability and makes it easy to verify AI accuracy and review surrounding context.
+
+
+
+## Citation Navigation
+
+The top-right corner of the Chunk Reader provides simple navigation controls for switching between multiple citations. The navigation area displays the current citation index and total count (e.g., "7/10"), so you always know your browsing progress.
+
+
+
+## Citation Quality Scoring
+
+Each citation includes a relevance score label showing its ranking among all matched knowledge fragments. Hover over the label to see full scoring details, including why the citation was selected and how its relevance score breaks down.
+
+
+
+## One-Click Document Export
+
+The Chunk Reader includes a content export feature so valuable information is never lost. Users with read access to the knowledge base can save the full cited document to their local device with a single click.
+
+
+
+# Advanced Features
+
+## Flexible Visibility Control
+
+FastGPT provides flexible citation visibility settings to balance openness and security. For example, with anonymous share links, administrators can precisely control what external visitors can see.
+
+When set to "citation content only," external users clicking a citation link will only see the specific cited text fragments, not the full source document. The Chunk Reader automatically adjusts its display mode accordingly.
+
+| | |
+| --- | --- |
+|  |  |
+
+## Instant Annotation
+
+While browsing, authorized users can annotate and correct citation content in real time. The system processes updates without interrupting the conversation. Modified content is clearly marked with an "Updated" label, maintaining both citation accuracy and conversation history integrity.
+
+This seamless knowledge refinement workflow is ideal for team collaboration, allowing the knowledge base to evolve during actual use so AI responses always draw from the latest, most accurate sources.
+
+## Smart Document Performance
+
+For real-world scenarios with ultra-long documents containing thousands of chunks, FastGPT uses advanced performance optimization to keep the Chunk Reader responsive.
+
+The system manages loading intelligently based on citation relevance ranking and database indexing, implementing on-demand rendering -- only content the user actually needs to view is loaded into memory. Whether jumping to a specific citation or scrolling through a document, the experience stays smooth regardless of document size.
+
+This optimization lets FastGPT handle enterprise-scale knowledge bases efficiently, even for professional documents with massive amounts of content.
diff --git a/document/content/docs/introduction/guide/admin/meta.en.json b/document/content/docs/introduction/guide/admin/meta.en.json
new file mode 100644
index 0000000000..4a43c9a140
--- /dev/null
+++ b/document/content/docs/introduction/guide/admin/meta.en.json
@@ -0,0 +1,8 @@
+{
+ "title": "Commercial Admin",
+ "description": "Commercial admin usage tutorial",
+ "pages": [
+ "sso",
+ "teamMode"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/admin/sso.en.mdx b/document/content/docs/introduction/guide/admin/sso.en.mdx
new file mode 100644
index 0000000000..93f380519b
--- /dev/null
+++ b/document/content/docs/introduction/guide/admin/sso.en.mdx
@@ -0,0 +1,643 @@
+---
+title: SSO & External Member Sync
+description: FastGPT External Member System Integration and Configuration
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+If you don't need SSO or member sync, or only need quick login via GitHub, Google, Microsoft, or WeChat Official Account, you can skip this section. This guide is for users who need to integrate their own member systems or mainstream office IMs.
+
+## Overview
+
+To simplify integration with **external member systems**, FastGPT provides a set of **standard interfaces** for connecting to external systems, along with a FastGPT-SSO-Service image that serves as an **adapter**.
+
+Through these standard interfaces, you can:
+
+1. SSO login. After a callback from an external system, create a user in FastGPT.
+2. Member and organizational structure sync (referred to as "member sync" below).
+
+**How It Works**
+
+FastGPT-pro includes a standard set of SSO and member sync interfaces. The system performs SSO and member sync operations based on these interfaces.
+
+FastGPT-SSO-Service aggregates SSO and member sync interfaces from different sources and converts them into the format recognized by fastgpt-pro.
+
+ 
+
+## System Configuration Tutorial
+
+### 1. Deploy the SSO-Service Image
+
+Deploy using docker-compose:
+
+```yaml
+ fastgpt-sso:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sso-service:v4.9.0 # This version must match the FastGPT image version
+ container_name: fastgpt-sso
+ restart: always
+ networks:
+ - fastgpt
+ environment:
+ - SSO_PROVIDER=example
+ - AUTH_TOKEN=xxxxx # Auth token, used by fastgpt-pro
+ # Provider-specific environment variables below
+```
+
+Depending on the provider, you'll need different environment variables. Below are the built-in protocols/IMs:
+
+
+
+
+
Protocol/Feature
+
SSO
+
Member Sync Support
+
+
+
+
+
Lark
+
Yes
+
Yes
+
+
+
WeCom
+
Yes
+
Yes
+
+
+
DingTalk
+
Yes
+
No
+
+
+
SAML 2.0
+
Yes
+
No
+
+
+
OAuth 2.0
+
Yes
+
No
+
+
+
+
+### 2. Configure fastgpt-pro
+
+#### 1. Configure Environment Variables
+
+The `EXTERNAL_USER_SYSTEM_BASE_URL` environment variable should be set to the internal network address. For example, with the configuration above:
+
+```yaml
+env:
+ - EXTERNAL_USER_SYSTEM_BASE_URL=http://fastgpt-sso:3000
+ - EXTERNAL_USER_SYSTEM_AUTH_TOKEN=xxxxx
+```
+
+#### 2. Configure button text, icons, etc. in the commercial version admin panel.
+
+
+
+
+
WeCom
+
DingTalk
+
Lark
+
+
+
+
+

+

+

+
+
+
+
+#### 3. Enable Member Sync (Optional)
+
+If you need to sync members from an external system, you can enable member sync. For team mode details, see: [Team Mode Documentation](/docs/introduction/guide/admin/teamMode)
+
+
+
+#### 4. Optional Configuration
+
+1. Automatic scheduled member sync
+
+Set the fastgpt-pro environment variable to enable automatic member sync:
+
+```yaml
+env:
+ - "SYNC_MEMBER_CRON=0 0 * * *" # Cron expression, runs daily at 00:00. Note: uses UTC (timezone 0). For example, to sync at 12:00 Beijing time, set this to "0 4 * * *" (UTC 04:00)
+```
+
+## Built-in Protocol/IM Configuration Examples
+
+### Lark
+
+#### 1. Get Parameters
+
+ App ID and App Secret
+
+ Go to the developer console, click on your enterprise self-built app, and view the app credentials on the Credentials & Basic Info page.
+
+ 
+
+#### 2. Permission Configuration
+
+ Go to the developer console, click on your enterprise self-built app, and enable permissions on the Permission Management page under Development Configuration.
+
+ 
+
+ You can use the **Batch Import/Export Permissions** feature to import the following permission configuration:
+
+```json
+{
+ "scopes": {
+ "tenant": [
+ "contact:user.phone:readonly",
+ "contact:contact.base:readonly",
+ "contact:department.base:readonly",
+ "contact:department.organize:readonly",
+ "contact:user.base:readonly",
+ "contact:user.department:readonly",
+ "contact:user.email:readonly",
+ "contact:user.employee_id:readonly"
+ ],
+ "user": []
+ }
+}
+```
+
+Note: The accessible data scope must be set to visible to all members.
+
+#### 3. Redirect URL
+
+ Go to the developer console, click on your enterprise self-built app, and set the redirect URL in Security Settings under Development Configuration.
+ The redirect URL should follow the format `https://www.fastgpt.cn/login/provider` — replace the domain with your publicly accessible FastGPT domain.
+ 
+
+#### 4. yml Configuration Example
+
+```yaml
+fastgpt-sso:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sso-service:v4.9.0
+ container_name: fastgpt-sso
+ restart: always
+ networks:
+ - fastgpt
+ environment:
+ - SSO_PROVIDER=feishu
+ - AUTH_TOKEN=xxxxx
+ # OAuth endpoint (for private Lark deployments, replace with your private address; same below)
+ - SSO_TARGET_URL=https://accounts.feishu.cn/open-apis/authen/v1/authorize
+ # Token endpoint
+ - FEISHU_TOKEN_URL=https://open.feishu.cn/open-apis/authen/v2/oauth/token
+ # User info endpoint
+ - FEISHU_GET_USER_INFO_URL=https://open.feishu.cn/open-apis/authen/v1/user_info
+ # Redirect address — must match the URL from step 3 exactly
+ - FEISHU_REDIRECT_URI=https://fastgpt.cn/login/provider
+ # Lark App ID, usually starts with cli
+ - FEISHU_APP_ID=xxx
+ # Lark App Secret
+ - FEISHU_APP_SECRET=xxx
+```
+
+### DingTalk
+
+#### 1. Get Parameters
+
+ CLIENT_ID and CLIENT_SECRET
+
+ Go to the DingTalk Open Platform, click App Development, select your app, and record the Client ID and Client Secret on the Credentials & Basic Info page.
+ 
+
+#### 2. Permission Configuration
+
+ Go to the DingTalk Open Platform, click App Development, select your app, and manage permissions on the Permission Management page under Development Configuration. Required permissions:
+
+ 1. ***Personal phone number information***
+ 2. ***Contact personal information read permission***
+ 3. ***Basic permission to obtain DingTalk open interface user access credentials***
+
+#### 3. Redirect URL
+
+ Go to the DingTalk Open Platform, click App Development, select your app, and configure on the Security Settings page under Development Configuration.
+ Two items need to be filled in:
+
+ 1. Server egress IP (list of server IPs calling DingTalk server-side APIs)
+ 2. Redirect URL (callback domain)
+
+#### 4. yml Configuration Example
+
+```yaml
+fastgpt-sso:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sso-service:v4.9.0
+ container_name: fastgpt-sso
+ restart: always
+ networks:
+ - fastgpt
+ environment:
+ - SSO_PROVIDER=dingtalk
+ - AUTH_TOKEN=xxxxx
+ # OAuth endpoint
+ - SSO_TARGET_URL=https://login.dingtalk.com/oauth2/auth
+ # Token endpoint
+ - DINGTALK_TOKEN_URL=https://api.dingtalk.com/v1.0/oauth2/userAccessToken
+ # User info endpoint
+ - DINGTALK_GET_USER_INFO_URL=https://oapi.dingtalk.com/v1.0/contact/users/me
+ # DingTalk App ID
+ - DINGTALK_CLIENT_ID=xxx
+ # DingTalk App Secret
+ - DINGTALK_CLIENT_SECRET=xxx
+```
+
+### WeCom
+
+#### 1. Get Parameters
+
+ 1. Enterprise CorpID
+
+ a. Log in to the WeCom admin console with an admin account: `https://work.weixin.qq.com/wework_admin/loginpage_wx`
+
+ b. Go to the "My Enterprise" page and find the Enterprise ID
+
+ 
+
+ 2. Create an internal app for FastGPT:
+
+ a. Get the app's AgentID and Secret
+
+ b. Ensure the app's visibility scope is set to all (i.e., root department)
+
+ 
+
+
+ 
+
+ 3. A domain name with the following requirements:
+
+ a. Resolves to a publicly accessible server
+
+ b. Can serve static files at the root path (for domain ownership verification — follow the prompts, you only need to host one static file, which can be removed after verification)
+
+ c. Configure web authorization, JS-SDK, and WeCom authorization login
+
+ d. You can set "Hide app in workbench" at the bottom of the WeCom Authorization Login page
+
+ 
+
+ 
+
+ 
+
+ 4. Get the "Contact Sync Assistant" secret
+
+ Retrieving contacts and organization member IDs requires the "Contact Sync Assistant" secret
+
+ Security & Management -- Management Tools -- Contact Sync
+
+ 
+
+ 5. Enable interface sync
+
+ 6. Get the Secret
+
+ 7. Configure enterprise trusted IPs
+
+ 
+
+#### 2. yml Configuration Example
+
+```yaml
+fastgpt-sso:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sso-service:v4.9.0
+ container_name: fastgpt-sso
+ restart: always
+ networks:
+ - fastgpt
+ environment:
+ - AUTH_TOKEN=xxxxx
+ - SSO_PROVIDER=wecom
+ # OAuth endpoint, used in WeCom client
+ - WECOM_TARGET_URL_OAUTH=https://open.weixin.qq.com/connect/oauth2/authorize
+ # SSO endpoint, QR code scan
+ - WECOM_TARGET_URL_SSO=https://login.work.weixin.qq.com/wwlogin/sso/login
+ # Get user ID (returns ID only)
+ - WECOM_GET_USER_ID_URL=https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo
+ # Get detailed user info (everything except name)
+ - WECOM_GET_USER_INFO_URL=https://qyapi.weixin.qq.com/cgi-bin/auth/getuserdetail
+ # Get user info (has name, no other info)
+ - WECOM_GET_USER_NAME_URL=https://qyapi.weixin.qq.com/cgi-bin/user/get
+ # Get department ID list
+ - WECOM_GET_DEPARTMENT_LIST_URL=https://qyapi.weixin.qq.com/cgi-bin/department/list
+ # Get user ID list
+ - WECOM_GET_USER_LIST_URL=https://qyapi.weixin.qq.com/cgi-bin/user/list_id
+ # WeCom CorpId
+ - WECOM_CORPID=
+ # WeCom App AgentId, usually 1000xxx
+ - WECOM_AGENTID=
+ # WeCom App Secret
+ - WECOM_APP_SECRET=
+ # Contact Sync Assistant Secret
+ - WECOM_SYNC_SECRET=
+```
+
+### Standard OAuth 2.0
+
+We provide OAuth 2.0 integration support using the authorization code grant from RFC 6749.
+References:
+- [RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749) documentation
+- [Ruan Yifeng's blog post on OAuth 2.0](https://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html)
+
+#### Parameter Requirements
+
+##### Three Endpoints
+We provide a standard OAuth 2.0 integration flow requiring three endpoints:
+
+1. Login authorization endpoint (users are redirected here with parameters after clicking the SSO button), e.g., `http://example.com/oauth/authorize`
+ ```bash
+ curl -X GET\
+ "http://example.com/oauth/authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz&redirect_uri=https%3A%2F%2Ffastgpt.cn%2Flogin%2Fprovider"
+ ```
+ After entering credentials, users are redirected to redirect_uri with a code parameter:
+ `https://fastgpt.cn/login/provider?code=4/P7qD2qAz4&state=xyz`
+2. Access token endpoint. After obtaining the code, make a *server-side request* to this endpoint to get the access_token, e.g., `http://example.com/oauth/access_token`
+ ```bash
+ curl -X POST\
+ -H "Content-Type: application/x-www-form-urlencoded"\
+ "http://example.com/oauth/access_token?grant_type=authorization_code&client_id=s6BhdRkqt3&client_secret=xxx&code=4/P7qD2qAz4&redirect_uri=https%3A%2F%2Ffastgpt.cn%2Flogin%2Fprovider"
+ ```
+ Note: Content-Type must be application/x-www-form-urlencoded, not application/json
+3. User info endpoint, requires passing the access_token, e.g., `http://example.com/oauth/user_info`
+ ```bash
+ curl -X GET\
+ -H "Authorization: Bearer 4/P7qD2qAz4"\
+ "http://example.com/oauth/user_info"
+ ```
+ Note: access_token is passed as the Authorization header in the format: Bearer xxxx
+
+##### Parameter Configuration
+- CLIENT_ID: Required
+- CLIENT_SECRET: Optional, skip if not needed
+- SCOPE: Optional, skip if not needed
+
+> The redirect_uri parameter is auto-populated based on the runtime environment
+>
+> Other fixed parameters like grant_type and response_type are auto-populated
+
+#### Configuration Example
+
+```yaml
+fastgpt-sso:
+ image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sso-service:v4.9.0
+ container_name: fastgpt-sso
+ restart: always
+ networks:
+ - fastgpt
+ environment:
+ - SSO_PROVIDER=oauth2
+ - AUTH_TOKEN=xxxxx
+ # OAuth2.0
+ # === Request URLs ===
+ # 1. OAuth2 login authorization URL (required)
+ - OAUTH2_AUTHORIZE_URL=
+ # 2. OAuth2 access token URL (required)
+ - OAUTH2_TOKEN_URL=
+ # 3. OAuth2 user info URL (required)
+ - OAUTH2_USER_INFO_URL=
+ # === Parameters ===
+ # 1. client_id (required)
+ - OAUTH2_CLIENT_ID=
+ # 2. client_secret (optional)
+ - OAUTH2_CLIENT_SECRET=
+ # 3. scope (optional)
+ - OAUTH2_SCOPE=
+ # === Field Mapping ===
+ # OAuth2 username field mapping (required)
+ - OAUTH2_USERNAME_MAP=
+ # OAuth2 avatar field mapping (optional)
+ - OAUTH2_AVATAR_MAP=
+ # OAuth2 member name field mapping (optional)
+ - OAUTH2_MEMBER_NAME_MAP=
+ # OAuth2 contact field mapping (optional)
+ - OAUTH2_CONTACT_MAP=
+```
+
+## Standard Interface Documentation
+
+Below is the standard interface documentation for SSO and member sync in FastGPT-pro. If you need to integrate with a non-standard system, refer to this section for development.
+
+
+
+FastGPT provides the following standard interfaces:
+
+1. https://example.com/login/oauth/getAuthURL - Get the authorization redirect URL
+2. https://example.com/login/oauth/getUserInfo?code=xxxxx - Consume the code and exchange it for user info
+3. https://example.com/org/list - Get the organization list
+4. https://example.com/user/list - Get the member list
+
+### Get SSO Login Redirect URL
+
+Returns a redirect login URL. FastGPT will automatically redirect to this URL. The redirect_uri is automatically appended to the URL query string.
+
+
+
+
+```bash
+curl -X GET "https://redict.example/login/oauth/getAuthURL?redirect_uri=xxx&state=xxxx" \
+-H "Authorization: Bearer your_token_here" \
+-H "Content-Type: application/json"
+```
+
+
+
+
+Success:
+
+```json
+{
+ "success": true,
+ "message": "",
+ "authURL": "https://example.com/somepath/login/oauth?redirect_uri=https%3A%2F%2Ffastgpt.cn%2Flogin%2Fprovider%0A"
+}
+```
+
+Failure:
+
+```json
+{
+ "success": false,
+ "message": "Error message",
+ "authURL": ""
+}
+```
+
+
+
+
+
+### SSO Get User Info
+
+This interface accepts a code parameter for authentication, consumes the code, and returns user info.
+
+
+
+
+```bash
+curl -X GET "https://oauth.example/login/oauth/getUserInfo?code=xxxxxx" \
+-H "Authorization: Bearer your_token_here" \
+-H "Content-Type: application/json"
+```
+
+
+
+
+
+Success:
+```json
+{
+ "success": true,
+ "message": "",
+ "username": "fastgpt-123456789",
+ "avatar": "https://example.webp",
+ "contact": "+861234567890",
+ "memberName": "Member name (optional)",
+}
+```
+
+Failure:
+```json
+{
+ "success": false,
+ "message": "Error message",
+ "username": "",
+ "avatar": "",
+ "contact": ""
+}
+```
+
+
+
+
+### Get Organizations
+
+
+
+
+```bash
+curl -X GET "https://example.com/org/list" \
+-H "Authorization: Bearer your_token_here" \
+-H "Content-Type: application/json"
+```
+
+
+
+
+
+Warning: Only one root department can exist. If your system has multiple root departments, you need to add a virtual root department first. Return type:
+
+```ts
+type OrgListResponseType = {
+ message?: string; // Error message
+ success: boolean;
+ orgList: {
+ id: string; // Unique department ID
+ name: string; // Name
+ parentId: string; // parentId — empty string for root department
+ }[];
+}
+```
+
+```json
+{
+ "success": true,
+ "message": "",
+ "orgList": [
+ {
+ "id": "od-125151515",
+ "name": "Root Department",
+ "parentId": ""
+ },
+ {
+ "id": "od-51516152",
+ "name": "Sub Department",
+ "parentId": "od-125151515"
+ }
+ ]
+}
+```
+
+
+
+
+
+### Get Members
+
+
+
+
+
+```bash
+curl -X GET "https://example.com/user/list" \
+-H "Authorization: Bearer your_token_here" \
+-H "Content-Type: application/json"
+```
+
+
+
+
+
+Return type:
+
+```typescript
+type UserListResponseListType = {
+ message?: string; // Error message
+ success: boolean;
+ userList: {
+ username: string; // Unique ID. username must match the username returned by the SSO interface. Must include a prefix, e.g., sync-aaaaa, consistent with the SSO interface prefix
+ memberName?: string; // Name, used as tmbname
+ avatar?: string;
+ contact?: string; // email or phone number
+ orgs?: string[]; // IDs of organizations the member belongs to. Pass [] if no organization
+ }[];
+}
+```
+curl example
+
+```json
+{
+ "success": true,
+ "message": "",
+ "userList": [
+ {
+ "username": "fastgpt-123456789",
+ "memberName": "John Doe",
+ "avatar": "https://example.webp",
+ "contact": "+861234567890",
+ "orgs": ["od-125151515", "od-51516152"]
+ },
+ {
+ "username": "fastgpt-12345678999",
+ "memberName": "Jane Smith",
+ "avatar": "",
+ "contact": "",
+ "orgs": ["od-125151515"]
+ }
+ ]
+
+}
+```
+
+
+
+
+
+
+
+## How to Integrate Non-Standard Systems
+
+1. Self-development: Build according to the standard interfaces provided by FastGPT, then enter the deployed service address into fastgpt-pro.
+ You can use this template repository as a starting point: [fastgpt-sso-template](https://github.com/labring/fastgpt-sso-template)
+2. Custom development by the FastGPT team:
+ a. Provide the system's SSO documentation, member and organization retrieval documentation, and an external test address.
+ b. In fastgpt-sso-service, add the corresponding provider and environment variables, and write the integration code.
diff --git a/document/content/docs/introduction/guide/admin/teamMode.en.mdx b/document/content/docs/introduction/guide/admin/teamMode.en.mdx
new file mode 100644
index 0000000000..6ef086d503
--- /dev/null
+++ b/document/content/docs/introduction/guide/admin/teamMode.en.mdx
@@ -0,0 +1,81 @@
+---
+title: Team Mode
+description: FastGPT Team Mode Documentation
+---
+
+## Overview
+
+Currently supported team modes:
+
+1. Multi-team mode (default)
+2. Single-team mode (one global team)
+3. Member sync mode (all members synced from external systems)
+
+
+
+
+
Team Mode
+
SMS/Email Registration
+
Admin Direct Add
+
SSO Registration
+
+
+
Creates Default Team
+
Joins Root Team
+
Creates Default Team
+
Joins Root Team
+
Creates Default Team
+
Joins Root Team
+
+
+
+
+
Single-team Mode
+
❌
+
✅
+
❌
+
✅
+
❌
+
✅
+
+
+
Multi-team Mode
+
✅
+
❌
+
✅
+
❌
+
✅
+
❌
+
+
+
Sync Mode
+
❌
+
❌
+
❌
+
❌
+
❌
+
✅
+
+
+
+
+### Multi-team Mode (Default)
+
+In multi-team mode, a default team owned by the user is automatically created when each user is created.
+
+### Single-team Mode
+
+Single-team mode is a new feature introduced in v4.9. To simplify personnel and resource management for enterprises, when single-team mode is enabled, new users no longer get their own default team — instead, they are added to the root user's team.
+
+### Sync Mode
+
+When system configuration is complete and sync mode is enabled, members from external member systems are automatically synced to FastGPT.
+
+For specific sync methods and rules, see [SSO & External Member Sync](/docs/introduction/guide/admin/sso.md).
+
+
+## Configuration
+
+In `fastgpt-pro`'s System Configuration - Member Configuration, you can configure the team mode.
+
+
diff --git a/document/content/docs/introduction/guide/course/ai_settings.en.mdx b/document/content/docs/introduction/guide/course/ai_settings.en.mdx
new file mode 100644
index 0000000000..c007358e1f
--- /dev/null
+++ b/document/content/docs/introduction/guide/course/ai_settings.en.mdx
@@ -0,0 +1,164 @@
+---
+title: AI Configuration Parameters
+description: FastGPT AI configuration parameters explained
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+The AI Chat module in FastGPT includes an advanced configuration section with various model parameters. This guide explains what each setting does.
+
+| | | |
+| --- | --- | --- |
+|  |  |  |
+
+## Stream Response (Workflow AI Chat only)
+
+Previously called "Return AI Content," now renamed to "Stream Response."
+
+This is a toggle. When enabled, the AI Chat module streams its output to the browser (API response) in real time. When disabled, the model is called in non-streaming mode and the output is not sent to the browser. However, the generated content can still be accessed via the [AI Reply] output and connected to other modules for further use.
+
+### Max Context
+
+The maximum number of tokens the model can handle.
+
+### Function Calling
+
+Models that support function calling are more accurate when using tools.
+
+### Temperature
+
+Lower values produce more focused, deterministic responses (in practice, the difference is subtle).
+
+### Max Output Tokens
+
+The maximum number of tokens in the response. Note: this is the response token limit, not the context token limit.
+
+Typically: max output = min(model's max output limit, max context - used context)
+
+Because of this, you generally don't set max context to the model's actual maximum — instead, reserve space for the response. For example, a 128k model might use max_context=115000.
+
+### System Prompt
+
+Placed at the beginning of the context array with role `system` to guide the model's behavior.
+
+### Memory Rounds (Basic Mode only)
+
+Configures how many conversation rounds the model retains. If the context exceeds the model's limit, the system automatically truncates to stay within bounds.
+
+So even if you set 30 rounds, the actual number at runtime may be fewer.
+
+## Citation Template & Citation Prompt
+
+After a Knowledge Base search, you can customize how search results are formatted into prompts. This setting is only available in the AI Chat node within workflows, and only takes effect when Knowledge Base content is referenced.
+
+
+
+### AI Chat Message Structure
+
+To use these two variables effectively, you need to understand the message format sent to the AI model. It's an array structured as follows in FastGPT:
+
+```json
+[
+ Built-in prompt (from config.json, usually empty)
+ System prompt (user-defined prompt)
+ Chat history
+ Question (composed of citation prompt, citation template, and user question)
+]
+```
+
+
+Tip: Click the context button to view the full context composition for easier debugging.
+
+
+### Citation Template and Prompt Design
+
+This feature has been removed from Basic Mode and is only configurable in workflows. Click the `settings icon` next to the Knowledge Base citation in the `AI Chat node` to configure it. As models improve, this feature will gradually become less critical.
+
+Citation templates and citation prompts typically work as a pair — the citation prompt depends on the citation template.
+
+FastGPT stores Knowledge Base data in QA pairs (not necessarily in question-answer format — just two variables). When converting to strings, the data is formatted according to the **citation template**. Available variables include: q, a, sourceId (data ID), index (nth entry), source (collection/file name), and score (distance score, 0-1). Reference them as needed using `{{q}}` `{{a}}` `{{sourceId}}` `{{index}}` `{{source}}` `{{score}}`. Here's an example:
+
+See [Knowledge Base Structure](/docs/introduction/guide/knowledge_base/dataset_engine/) for details on how the Knowledge Base is structured.
+
+#### Citation Template
+
+```
+{instruction:"{{q}}",output:"{{a}}",source:"{{source}}"}
+```
+
+Search results automatically replace q, a, and source with the corresponding content. Each result is separated by `\n`. For example:
+```
+{instruction:"Who directed the movie 'Suzume'?",output:"The movie 'Suzume' was directed by Makoto Shinkai.",source:"Manual input"}
+{instruction:"Who is the protagonist?",output:"The protagonist is a girl named Suzume.",source:""}
+{instruction:"Who is the male lead in 'Suzume'?",output:"The male lead in 'Suzume' is Souta Munakata, voiced by Hokuto Matsumura.",source:""}
+{instruction:"Who wrote the screenplay for 'Suzume'?",output:"Makoto Shinkai wrote the screenplay.",source:"Manual input"}
+```
+
+#### Citation Prompt
+
+The citation template must be used together with a citation prompt. The prompt can describe the template format and specify conversation requirements. Use `{{quote}}` to insert the **citation template** content, and `{{question}}` to insert the question. For example:
+
+```
+Your background knowledge:
+"""
+{{quote}}
+"""
+Conversation requirements:
+1. The background knowledge is up-to-date. "instruction" provides relevant context, and "output" is the expected answer or supplement.
+2. Use the background knowledge to answer questions.
+3. If the background knowledge cannot answer the question, respond politely.
+My question is: "{{question}}"
+```
+
+After substitution:
+```
+Your background knowledge:
+"""
+{instruction:"Who directed the movie 'Suzume'?",output:"The movie 'Suzume' was directed by Makoto Shinkai.",source:"Manual input"}
+{instruction:"Who is the protagonist?",output:"The protagonist is a girl named Suzume.",source:""}
+{instruction:"Who is the male lead in 'Suzume'?",output:"The male lead in 'Suzume' is Souta Munakata, voiced by Hokuto Matsumura}
+"""
+Conversation requirements:
+1. The background knowledge is up-to-date. "instruction" provides relevant context, and "output" is the expected answer or supplement.
+2. Use the background knowledge to answer questions.
+3. If the background knowledge cannot answer the question, respond politely.
+My question is: "{{question}}"
+```
+
+#### Summary
+
+The citation template defines how each search result is formatted into a string, composed of variables like q, a, index, and source.
+
+The citation prompt combines the `citation template` with `instructions` that typically describe the template format and specify requirements for the model.
+
+### Citation Template and Prompt Design Examples
+
+#### General Template vs. QA Template
+
+We compared the general template and QA template using a set of "Who are you?" manual data entries. We intentionally included a humorous answer — under the general template, GPT-3.5 became less compliant, while under the QA template it still answered correctly. This is because structured prompts provide stronger guidance for LLMs.
+
+
+Tip: For best results, use only one data type per Knowledge Base for each scenario to maximize prompt effectiveness.
+
+
+| General template config & results | QA template config & results |
+| --- | --- |
+|  |  |
+|  |  |
+|  |  |
+
+#### Strict Template
+
+With a non-strict template, asking about something not in the Knowledge Base typically causes the model to answer from its own knowledge.
+
+| Non-strict template results | Selecting strict template | Strict template results |
+| --- | --- | --- |
+|  |  | |
+
+#### Prompt Design Tips
+
+1. Use numbered lists for different requirements.
+2. Use sequencing words like "first," "then," and "finally."
+3. When listing requirements for different scenarios, be thorough. For example, cover all three cases: the background knowledge fully answers the question, partially answers it, or is unrelated.
+4. Leverage structured prompts — for instance, in the QA template, `instruction` and `output` clearly tell the model that `output` is the expected answer.
+5. Use correct and complete punctuation.
diff --git a/document/content/docs/introduction/guide/course/chat_input_guide.en.mdx b/document/content/docs/introduction/guide/course/chat_input_guide.en.mdx
new file mode 100644
index 0000000000..6ec362cd73
--- /dev/null
+++ b/document/content/docs/introduction/guide/course/chat_input_guide.en.mdx
@@ -0,0 +1,50 @@
+---
+title: Chat Input Guide
+description: FastGPT chat input guide
+---
+
+
+
+## What is Custom Question Guidance?
+
+You can preset questions for your app. As users type, the system dynamically searches these questions based on their input and displays them as suggestions, helping users ask questions faster.
+
+You can configure the question list directly in FastGPT or provide a custom API endpoint.
+
+## Custom Question List API
+
+The endpoint must be accessible from the user's browser.
+
+**Request:**
+
+```bash
+curl --location --request GET 'http://localhost:3000/api/core/chat/inputGuide/query?appId=663c75302caf8315b1c00194&searchKey=you'
+```
+
+Where `appId` is the application ID and `searchKey` is the search keyword (max 50 characters).
+
+**Response**
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": [
+ "it's you",
+ "who are you",
+ "you're great",
+ "hello there",
+ "who are you!",
+ "hello"
+ ]
+}
+```
+
+`data` is an array of matched questions. Return at most 5 results.
+
+
+**Parameters:**
+
+- appId - Application ID
+- searchKey - Search keyword
diff --git a/document/content/docs/introduction/guide/course/fileInput.en.mdx b/document/content/docs/introduction/guide/course/fileInput.en.mdx
new file mode 100644
index 0000000000..9e1b7b2120
--- /dev/null
+++ b/document/content/docs/introduction/guide/course/fileInput.en.mdx
@@ -0,0 +1,109 @@
+---
+title: File Input
+description: FastGPT file input feature overview
+---
+
+Starting from version 4.8.9, FastGPT supports configuring file and image uploads in both `Basic Mode` and `Workflows`. This guide covers how to use the file input feature and explains how document parsing works under the hood.
+
+
+## Using in Basic Mode
+
+When file upload is enabled in Basic Mode, it uses tool-calling mode — the model decides whether to read the file content.
+
+Find the file upload option on the left panel and click the `Enable`/`Disable` toggle to open the configuration dialog.
+
+
+
+Once enabled, a file selection icon appears in the chat input area. Click it to select files for upload.
+
+
+
+**Behavior**
+
+Starting from version 4.8.13, Basic Mode forces file parsing and injects the content into the system prompt, preventing cases where the model skips reading the file during multi-turn conversations.
+
+## Using in Workflows
+
+In Workflows, find the `File Input` option in the system configuration panel and click the `Enable`/`Disable` toggle to open the configuration dialog.
+
+
+
+There are many ways to use files in Workflows. The simplest approach, shown below, connects document parsing via tool calling — achieving the same result as Basic Mode.
+
+| | |
+| --------------------- | --------------------- |
+|  |  |
+
+You can also use Workflows to extract or analyze document content, then pass the results to HTTP requests or other modules to build a document processing pipeline.
+
+
+
+## How Document Parsing Works
+
+Unlike image recognition, LLMs currently cannot parse documents directly. All document "understanding" is achieved by converting documents to text and injecting it into the prompt. The following FAQs explain how this works — understanding the mechanics helps you use document parsing more effectively in Workflows.
+
+### How are uploaded files stored in the database?
+
+In FastGPT's chat history, messages with role=user store their value in this structure:
+
+```ts
+type UserChatItemValueItemType = {
+ type: 'text' | 'file'
+ text?: {
+ content: string;
+ };
+ file?: {
+ type: 'img' | 'doc'
+ name?: string;
+ url: string;
+ };
+};
+```
+
+Uploaded images and documents are stored as URLs — the parsed document content is not stored.
+
+### How are images handled?
+
+The document parsing node does not process images. Image URLs are filtered out. For image recognition, use an LLM that supports vision.
+
+### How does the document parsing node work?
+
+The document parsing node accepts an `array` input (file URLs) and outputs a `string` (the parsed content).
+
+* The node only parses URLs with document-type file extensions. If you upload both documents and images, images are ignored.
+* **The document parsing node only processes files from the current workflow run, not files from chat history.**
+* How multiple documents are concatenated:
+
+Multiple files are concatenated using the following template — filename + content, separated by `\n******\n`:
+
+```
+File: ${filename}
+
+${content}
+
+```
+
+### How to use document parsing in AI nodes
+
+AI nodes (AI Chat / Tool Calling) have a document URL input that lets you reference document addresses directly.
+
+It accepts an `Array` input. The URLs are parsed and injected into a system message using this prompt template:
+
+```
+Use the content in as reference for this conversation:
+
+{{quote}}
+
+```
+
+# Changes to File Upload in Version 4.8.13
+
+There are some differences from version 4.8.9. We've maintained backward compatibility to avoid breaking existing workflows, but please update your workflows to follow the new rules as soon as possible — compatibility code will be removed in future versions.
+
+1. Basic Mode now forces file parsing instead of letting the model decide, ensuring documents are always referenced.
+2. Document parsing: no longer parses files from chat history.
+3. Tool Calling: supports direct document reference selection — no need to attach a document parsing tool. Automatically parses files from chat history.
+4. AI Chat: supports direct document reference selection — no need to go through the document parsing node. Automatically parses files from chat history.
+5. Standalone plugin execution: no longer supports global files. Plugin inputs now support file-type configuration as a replacement for global file upload.
+6. **Workflow calling plugins: uploaded files are no longer automatically passed to plugins. You must manually specify the variable for plugin input.**
+7. **Workflow calling sub-workflows: uploaded files are no longer automatically passed to sub-workflows. You can manually select which file URLs to pass.**
diff --git a/document/content/docs/introduction/guide/course/meta.en.json b/document/content/docs/introduction/guide/course/meta.en.json
new file mode 100644
index 0000000000..6e799b0743
--- /dev/null
+++ b/document/content/docs/introduction/guide/course/meta.en.json
@@ -0,0 +1,10 @@
+{
+ "title": "Basic Tutorial",
+ "description": "FastGPT basic tutorial",
+ "pages": [
+ "quick-start",
+ "ai_settings",
+ "chat_input_guide",
+ "fileInput"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/course/quick-start.en.mdx b/document/content/docs/introduction/guide/course/quick-start.en.mdx
new file mode 100644
index 0000000000..4414258900
--- /dev/null
+++ b/document/content/docs/introduction/guide/course/quick-start.en.mdx
@@ -0,0 +1,50 @@
+---
+title: Quick Start
+description: Get started with FastGPT basics
+---
+
+For more tips, [watch the video tutorial](https://www.bilibili.com/video/BV1sH4y1T7s9)
+
+## Knowledge Base
+
+Before you begin, prepare a test document — Word, PDF, TXT, Excel, or Markdown all work. For example, a company leave policy, non-confidential sales scripts, or product documentation.
+
+We'll use the FastGPT Chinese README file as an example.
+
+First, create a Knowledge Base.
+
+
+
+After creating the Knowledge Base, upload some content.
+
+There are four upload modes:
+- Manual Input: Enter QA pairs manually — the most precise method
+- QA Split: Upload a text file and let AI generate QA pairs automatically
+- Direct Chunking: Upload a text file and split it into segments directly
+- CSV Import: Batch import QA pairs
+
+Here we'll use QA Split to let AI generate QA pairs automatically. You can edit them manually later if the quality isn't satisfactory.
+
+
+
+After uploading, wait for processing to complete until the file status shows as available.
+
+
+
+## Application
+
+Click the "Application" button to create a new app. There are four templates — select "Knowledge Base + Chat Guide."
+
+
+
+After creating the app, go to the detail page, find the "Knowledge Base" section, and add the Knowledge Base you just created.
+
+
+
+After adding the Knowledge Base, click "Save and Preview" to link your app with the Knowledge Base.
+
+
+
+Now you're ready to start chatting.
+
+
diff --git a/document/content/docs/introduction/guide/dashboard/basic-mode.en.mdx b/document/content/docs/introduction/guide/dashboard/basic-mode.en.mdx
new file mode 100644
index 0000000000..59489ca7bc
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/basic-mode.en.mdx
@@ -0,0 +1,5 @@
+---
+title: Basic Mode
+description: A quick overview of FastGPT Dashboard's Basic Mode
+---
+
diff --git a/document/content/docs/introduction/guide/dashboard/evaluation.en.mdx b/document/content/docs/introduction/guide/dashboard/evaluation.en.mdx
new file mode 100644
index 0000000000..a548c9f446
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/evaluation.en.mdx
@@ -0,0 +1,74 @@
+---
+title: 'App Evaluation (Beta)'
+description: 'A quick overview of FastGPT app evaluation'
+---
+
+Starting from FastGPT v4.11.0, batch app evaluation is supported. By providing multiple QA pairs, the system automatically scores your app's responses, enabling quantitative assessment of app performance.
+
+The system supports three evaluation metrics: answer accuracy, question relevance, and semantic accuracy. The current beta only includes answer accuracy — the remaining metrics will be added in future releases.
+
+## Create an App Evaluation
+
+### Go to the Evaluation Page
+
+
+
+Navigate to the App Evaluation section under Workspace and click the "Create Task" button in the upper right corner.
+
+### Fill in Evaluation Details
+
+
+
+On the task creation page, provide the following:
+
+- **Task Name**: A label to identify this evaluation
+- **Evaluation Model**: The model used for scoring
+- **Target App**: The app to be evaluated
+
+### Prepare Evaluation Data
+
+
+
+After selecting the target app, a button appears to download the CSV template. The template includes these fields:
+
+- Global variables
+- q (question)
+- a (expected answer)
+- Chat history
+
+**Notes:**
+
+- Maximum of 1,000 QA pairs
+- Follow the template format when filling in data
+
+Upload the completed file and click "Start Evaluation" to create the task.
+
+## View Evaluation Results
+
+### Evaluation List
+
+
+
+The evaluation list shows all tasks with key information:
+
+- **Progress**: Current execution status
+- **Created By**: The user who created the task
+- **Target App**: The app being evaluated
+- **Start/End Time**: Execution time range
+- **Overall Score**: The task's aggregate score
+
+Use this to compare results across iterations as you improve your app.
+
+### Evaluation Details
+
+
+
+Click "View Details" to open the detail page:
+
+**Task Overview**: The top section shows overall task information, including evaluation configuration and summary statistics.
+
+**Detailed Results**: The bottom section lists each QA pair with its score, showing:
+
+- User question
+- Expected output
+- App output
diff --git a/document/content/docs/introduction/guide/dashboard/gapier.en.mdx b/document/content/docs/introduction/guide/dashboard/gapier.en.mdx
new file mode 100644
index 0000000000..dcd550639e
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/gapier.en.mdx
@@ -0,0 +1,56 @@
+---
+title: Import Agent Tools with Gapier
+description: Quickly import Agent tools into FastGPT using Gapier
+---
+
+FastGPT V4.7 introduced tool calling, compatible with GPTs Actions. This means you can directly import GPTs-compatible Agent tools.
+
+Gapier is an online GPTs Actions platform offering 50+ ready-made tools with a daily free quota for testing. Official site: [https://gapier.com/](https://gapier.com/).
+
+
+
+Let's walk through importing Gapier tools into FastGPT.
+
+## 1. Create a Plugin
+
+| Step1 | Step2 | Step3 |
+| --- | --- | --- |
+|  |  | Log in to [Gapier](https://gapier.com/) and copy the relevant parameters  |
+| Step4 | Step5 | Step6 |
+| Custom request header: Authorization Value: Bearer your_copied_key  |  |  |
+
+After creation, if you need to make changes, there's no need to recreate — just modify the parameters and the system will automatically detect and apply the differences.
+
+
+
+## 2. Bind Tools to an Application
+
+### Basic Mode
+
+| Step1 | Step2 |
+| --- | --- |
+|  |  |
+| Step3 | Step4 |
+|  |  |
+
+### Advanced Workflow
+
+| Step1 | Step2 |
+| --- | --- |
+|  |  |
+| Step3 | Step4 |
+|  |  |
+
+
+
+## 3. Tool Calling Notes
+
+### Differences Between Models
+
+Different models use different methods for tool calling. Models that support toolChoice and functionCall produce better results. Models without these capabilities fall back to prompt-based calling, which is less reliable. To ensure smooth operation, FastGPT's built-in prompts only support calling one tool at a time.
+
+Check the official documentation to see which models support functionCall (OneAPI support is also required), and adjust the corresponding fields in the model configuration file (see the configuration field reference for details).
+
+Cloud version users can see whether function calling is supported when selecting a model.
+
+
diff --git a/document/content/docs/introduction/guide/dashboard/intro.en.mdx b/document/content/docs/introduction/guide/dashboard/intro.en.mdx
new file mode 100644
index 0000000000..5e2590db0f
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/intro.en.mdx
@@ -0,0 +1,89 @@
+---
+title: Workflows & Plugins
+description: A quick overview of FastGPT Workflows and Plugins
+---
+
+Starting from V4.0, FastGPT adopted a new approach to building AI applications. It uses Flow node orchestration (Workflows) to implement complex processes, improving flexibility and extensibility. This does raise the learning curve — users with development experience will find it easier to pick up.
+
+[Watch the video tutorial](https://www.bilibili.com/video/BV1is421u7bQ/)
+
+
+
+## What is a Node?
+
+In programming terms, a node is like a function or API endpoint — think of it as a **step**. By connecting multiple nodes together, you build a step-by-step process that produces the final AI output.
+
+Below is the simplest AI conversation, consisting of a Workflow Start node and an AI Chat node.
+
+
+
+Execution flow:
+1. The user inputs a question. The [Workflow Start] node executes and saves the user's question.
+2. The [AI Chat] node executes. It has two required parameters: "Chat History" and "User Question." Chat history defaults to 6 messages, representing the context length. The user question comes from the [Workflow Start] node.
+3. The [AI Chat] node calls the conversation API with the chat history and user question to generate a response.
+
+### Node Categories
+
+Functionally, nodes fall into 2 categories:
+
+1. **System Nodes**: User guidance (configures dialog information) and user question (workflow entry point).
+2. **Function Nodes**: Knowledge Base search, AI Chat, and all other nodes. These have inputs and outputs and can be freely combined.
+
+### Node Components
+
+Each node has 3 core parts: inputs, outputs, and triggers.
+
+ 
+
+ - AI model, prompt, chat history, user question, and Knowledge Base citation are inputs. Inputs can be manual entries or variable references, which include "global variables" and outputs from any previous node.
+ - New context and AI reply content are outputs. Outputs can be referenced by any subsequent node.
+ - Each node has four "triggers" (top, bottom, left, right) for connections. Connected nodes execute sequentially based on conditions.
+
+## Key Concept — How Workflows Execute
+
+FastGPT Workflows start from the [Workflow Start] node, triggered when the user inputs a question. There is no **fixed exit point** — the workflow ends when all nodes stop running. If no nodes execute in a given cycle, the workflow completes.
+
+Let's look at how workflows execute and when each node is triggered.
+
+ 
+
+As shown above, nodes can "be connected to" and "connect to other nodes." We call incoming connections "predecessor lines" and outgoing connections "successor lines." In the example, the [Knowledge Base Search] node has one predecessor line on the left and one successor line on the right. The [AI Chat] node only has a predecessor line on the left.
+
+Lines in FastGPT Workflows have these states:
+- `waiting`: The connected node is waiting to execute.
+- `active`: The connected node is ready to execute.
+- `skip`: The connected node should be skipped.
+
+Node execution rules:
+
+1. If any predecessor line has `waiting` status, the node waits.
+2. If any predecessor line has `active` status, the node executes.
+3. If no predecessor lines are `waiting` or `active`, the node is skipped.
+4. After execution, successor lines are updated to `active` or `skip`, and predecessor lines reset to `waiting` for the next cycle.
+
+Walking through the example:
+1. [Workflow Start] completes and sets its successor line to `active`.
+2. [Knowledge Base Search] sees its predecessor line is `active`, executes, then sets its successor line to `active` and predecessor line to `waiting`.
+3. [AI Chat] sees its predecessor line is `active` and executes. The workflow ends.
+
+## How to Connect Nodes
+
+1. Each node has connection points on all four sides for convenience. Left and top are predecessor connection points; right and bottom are successor connection points.
+2. Click the x in the middle of a connection line to delete it.
+3. Left-click to select a connection line.
+
+## How to Read Workflows
+
+1. Read from left to right.
+2. Start from the **User Question** node, which represents the user sending text to trigger the workflow.
+3. Focus on [AI Chat] and [Specified Reply] nodes — these are where answers are output.
+
+## FAQ
+
+### How do I merge multiple outputs?
+
+1. Text Processing: can merge strings together.
+2. Knowledge Base Search Merge: can combine multiple Knowledge Base search results.
+3. Other results: cannot be merged directly. Consider passing them to an `HTTP` node for merging. Use [Laf](https://laf.run/) to quickly create a serverless HTTP endpoint.
+
+
diff --git a/document/content/docs/introduction/guide/dashboard/mcp_server.en.mdx b/document/content/docs/introduction/guide/dashboard/mcp_server.en.mdx
new file mode 100644
index 0000000000..1cd17d7f86
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/mcp_server.en.mdx
@@ -0,0 +1,101 @@
+---
+title: MCP Server
+description: A quick overview of FastGPT MCP Server
+---
+
+## What is MCP Server?
+
+MCP (Model Context Protocol) was released by Anthropic in early November 2024. It standardizes communication between AI models and external systems, simplifying integration. With OpenAI officially supporting MCP, more and more AI vendors are adopting the protocol.
+
+MCP has two main components: Client and Server. The Client is the AI model consumer — it uses MCP Client to give the model the ability to call external systems. The Server provides and runs those external system integrations.
+
+FastGPT's MCP Server feature lets you select `multiple` applications built on FastGPT and expose them via MCP protocol for external consumption.
+
+Currently, FastGPT's MCP Server uses the SSE transport protocol, with plans to migrate to `HTTP Streamable` in the future.
+
+## Using MCP Server in FastGPT
+
+### 1. Create an MCP Server
+
+After logging into FastGPT, open `Workspace` and click `MCP Server` to access the management page. Here you can see all your MCP Servers and the number of applications each one manages.
+
+
+
+You can customize the MCP Server name and select which applications to associate.
+
+| | |
+|---|---|
+|  |  |
+
+### 2. Get the MCP Server URL
+
+After creating an MCP Server, click `Start Using` to get the access URL.
+
+| | |
+|---|---|
+|  |  |
+
+#### 3. Use the MCP Server
+
+Use the URL in any MCP-compatible client to call your FastGPT applications — for example, `Cursor` or `Cherry Studio`. Here's how to set it up in Cursor.
+
+Open Cursor's settings page and click MCP to enter the MCP configuration page. Click the new MCP Server button to open a JSON configuration file. Paste the `integration script` from step 2 into the `JSON file` and save.
+
+Return to Cursor's MCP management page and you'll see your MCP Server listed. Make sure to set it to `enabled`.
+
+| | | |
+|---|---|---|
+|  |  |  |
+
+
+Open Cursor's chat panel and switch to `Agent` mode — only this mode triggers MCP Server calls.
+After sending a question about `fastgpt`, you'll see Cursor invoke an MCP tool (described as: query fastgpt knowledge base), which calls the FastGPT application to process the question and return results.
+
+| | |
+|---|---|
+|  |  |
+
+
+## Self-Hosted MCP Server Setup
+
+Self-hosted FastGPT deployments require version `v4.9.6` or higher to use MCP Server.
+
+### Update docker-compose.yml
+
+Add the `fastgpt-mcp-server` service to your `docker-compose.yml`:
+
+```yml
+fastgpt-mcp-server:
+ container_name: fastgpt-mcp-server
+ image: ghcr.io/labring/fastgpt-mcp_server:latest
+ ports:
+ - 3005:3000
+ networks:
+ - fastgpt
+ restart: always
+ environment:
+ - FASTGPT_ENDPOINT=http://fastgpt:3000
+```
+
+### Update FastGPT Configuration
+
+In your `config.json`, add: `"feconfigs.mcpServerProxyEndpoint": ""` (no trailing slash). For example:
+```json
+{
+ "feConfigs": {
+ "lafEnv": "https://laf.dev",
+ "mcpServerProxyEndpoint": "https://mcp.fastgpt.cn"
+ }
+}
+```
+
+### Restart FastGPT
+
+Since you modified a mounted config file, force a full restart:
+
+```bash
+docker-compose down
+docker-compose up -d
+```
+
+After restarting, the MCP Server option will appear in the Workspace.
diff --git a/document/content/docs/introduction/guide/dashboard/mcp_tools.en.mdx b/document/content/docs/introduction/guide/dashboard/mcp_tools.en.mdx
new file mode 100644
index 0000000000..2cc70fc400
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/mcp_tools.en.mdx
@@ -0,0 +1,51 @@
+---
+title: MCP Tools
+description: A quick guide to integrating MCP tools with FastGPT
+---
+
+Starting from FastGPT v4.9.6, a new application type called MCP Tools has been added. It lets you provide an MCP SSE URL to batch-create tools that models can easily call. Here's how to create MCP tools and have AI use them.
+
+## Create an MCP Tools Collection
+
+First, select "New MCP Tools Collection." We'll use the Amap (Gaode Maps) MCP Server as an example: [Amap MCP Server](https://lbs.amap.com/api/mcp-server/create-project-and-key)
+
+You'll need an MCP URL, e.g., https://mcp.amap.com/sse?key=xxx
+
+
+
+Enter the URL in the dialog and click Parse. The system will discover and list the available tools.
+
+Click Create to finish setting up the MCP tools and collection.
+
+## Test MCP Tools
+
+Inside the MCP Tools collection, you can debug each tool individually.
+
+
+
+For example, select the maps_weather tool and click Run to see the weather data for Hangzhou.
+
+
+## AI Calling Tools
+
+### Call Individual Tools
+
+
+
+Using maps_weather and maps_text_search as examples, ask the AI two different questions. The AI intelligently selects the appropriate tool, retrieves the needed information, and responds based on the results.
+
+| | |
+|---|---|
+|  |  |
+
+### Call an Entire Tools Collection
+
+FastGPT also supports calling an entire MCP Tools collection. The AI automatically picks the right tool to execute.
+
+Click the MCP Tools collection to add a collection-type node, then connect it using the Tool Calling node.
+
+| | |
+|---|---|
+|  |  |
+
+The AI similarly selects the appropriate tool, retrieves the needed information, and responds based on the results.
diff --git a/document/content/docs/introduction/guide/dashboard/meta.en.json b/document/content/docs/introduction/guide/dashboard/meta.en.json
new file mode 100644
index 0000000000..8901076219
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/meta.en.json
@@ -0,0 +1,13 @@
+{
+ "title": "Dashboard",
+ "description": "FastGPT dashboard and workflow node usage guide",
+ "pages": [
+ "basic-mode",
+ "intro",
+ "workflow",
+ "mcp_server",
+ "mcp_tools",
+ "gapier",
+ "evaluation"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/ai_chat.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/ai_chat.en.mdx
new file mode 100644
index 0000000000..26ac4492b2
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/ai_chat.en.mdx
@@ -0,0 +1,30 @@
+---
+title: AI Chat
+description: FastGPT AI Chat node overview
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Characteristics
+
+- Can be added multiple times
+- Trigger-based execution
+- Core module
+
+
+
+## Parameters
+
+## AI Model
+
+Configure available chat models via [config.json](/docs/introduction/development/configuration/) and connect multiple models through [one-api](/docs/introduction/development/modelConfig/one-api).
+
+Click the AI model to configure its parameters.
+
+
+
+
+
+
+ For detailed parameter descriptions, see: [AI Parameter Configuration](/docs/introduction/guide/course/ai_settings/)
+
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/content_extract.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/content_extract.en.mdx
new file mode 100644
index 0000000000..d186579fc2
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/content_extract.en.mdx
@@ -0,0 +1,53 @@
+---
+title: Text Content Extraction
+description: FastGPT Text Content Extraction node overview
+---
+
+## Characteristics
+
+- Can be added multiple times
+- Requires manual configuration
+- Trigger-based execution
+- function_call module
+- Core module
+
+
+
+## What It Does
+
+Extracts structured data from text, typically used with the HTTP node for extended functionality. It can also perform direct extraction tasks such as translation.
+
+## Parameters
+
+### Extraction Requirement Description
+
+Set a goal for the model describing what content needs to be extracted.
+
+**Example 1**
+
+> You are a lab appointment assistant. Extract the name, appointment time, and lab number from the conversation. Current time `{{cTime}}`
+
+**Example 2**
+
+> You are a Google search assistant. Extract search keywords from the conversation.
+
+**Example 3**
+
+> Translate my question directly into English without answering it.
+
+### Chat History
+
+Some chat history is usually needed for more complete extraction. For example, if the task requires a name, time, and lab name, the user might initially provide only the time and lab name. After being prompted for the missing info, the user provides their name. At that point, the previous record is needed to extract all 3 fields completely.
+
+### Target Fields
+
+Target fields correspond to extraction results. As shown above, each new field adds a corresponding output.
+
++ **key**: Unique identifier for the field. Must not be duplicated.
++ **Field description**: Describes what the field represents, e.g., name, time, search keyword, etc.
++ **Required**: Whether the model is forced to extract this field. It may still return an empty string.
+
+## Output
+
+- **Complete extraction result**: A JSON string containing all extracted fields.
+- **Target field extraction results**: All returned as string type.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/coreferenceResolution.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/coreferenceResolution.en.mdx
new file mode 100644
index 0000000000..67956827d7
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/coreferenceResolution.en.mdx
@@ -0,0 +1,34 @@
+---
+title: Query Enhancement
+description: FastGPT Query Enhancement node overview and usage
+---
+
+## Characteristics
+
+- Can be added multiple times
+- Has external input
+- Trigger-based execution
+
+
+
+## Background
+
+In RAG, we perform embedding searches against the database based on the input query to find relevant content (Knowledge Base search).
+
+During search -- especially in multi-turn conversations -- follow-up questions often fail to retrieve useful results. One reason is that Knowledge Base search only uses the "current" question. Consider this example:
+
+
+
+When the user asks "What is the second point?", the system searches the Knowledge Base for exactly that phrase and finds nothing. The actual intended query is "What is the QA structure?". This is why we need a Query Enhancement node to refine the user's current question so the Knowledge Base search can return relevant results. With query enhancement applied:
+
+
+
+## What It Does
+
+Calls an AI model to complete and refine the user's current question. It primarily resolves coreferences (pronouns and vague references), making search queries more complete and reliable. This improves Knowledge Base search accuracy in multi-turn conversations.
+
+The main challenge is that the model may not have a clear understanding of "completion" and often struggles to determine how to properly refine queries with long context.
+
+## Examples
+
+- [Integrate Google Search](/docs/use-cases/app-cases/google_search/)
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/custom_feedback.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/custom_feedback.en.mdx
new file mode 100644
index 0000000000..41f5d014fb
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/custom_feedback.en.mdx
@@ -0,0 +1,31 @@
+---
+title: Custom Feedback
+description: FastGPT Custom Feedback node overview
+---
+
+This is a temporary module that will receive a more comprehensive redesign in the future.
+
+## Characteristics
+
+- Can be added multiple times
+- No external input
+- Auto-executed
+
+
+| | |
+| --------------------- | --------------------- |
+|  |  |
+|  |  |
+
+
+## Overview
+
+The Custom Feedback node adds a feedback tag to conversations, making it easier to analyze conversation data from the admin panel.
+
+In debug mode, feedback content is not recorded. Instead it displays: `Auto feedback test: feedback content`.
+
+In conversation mode (chat, shared window, or API calls with chatId), feedback content is recorded in the conversation log with a 60-second delay.
+
+## Use Cases
+
+The Custom Feedback node works like event tracking in software development, letting you observe and monitor data within conversations.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/dataset_search.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/dataset_search.en.mdx
new file mode 100644
index 0000000000..ea5f887d83
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/dataset_search.en.mdx
@@ -0,0 +1,30 @@
+---
+title: Knowledge Base Search
+description: FastGPT Knowledge Base Search node overview
+---
+
+For detailed parameters and internal logic, see: [FastGPT Knowledge Base Search](/docs/introduction/guide/knowledge_base/rag/)
+
+## Characteristics
+
+- Can be added multiple times (keeps connections tidy in complex workflows)
+- Has external input
+- Has static configuration
+- Trigger-based execution
+- Core module
+
+
+
+## Parameters
+
+### Input - Linked Knowledge Bases
+
+Select one or more Knowledge Bases using the **same embedding model** for vector search.
+
+### Input - Search Parameters
+
+[View parameter details](/docs/introduction/guide/knowledge_base/dataset_engine/#搜索参数)
+
+### Output - Referenced Content
+
+Outputs references as an array with a possible length of 0. This means the output path will still execute even when no results are found.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/document_parsing.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/document_parsing.en.mdx
new file mode 100644
index 0000000000..b033746af6
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/document_parsing.en.mdx
@@ -0,0 +1,14 @@
+---
+title: Document Parsing
+description: FastGPT Document Parsing node overview
+---
+
+| | |
+| --- | --- |
+|  |  |
+
+The Document Parsing component becomes available after enabling file upload.
+
+## Features
+
+## Use Cases
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/form_input.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/form_input.en.mdx
new file mode 100644
index 0000000000..8ed662c5fc
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/form_input.en.mdx
@@ -0,0 +1,28 @@
+---
+title: Form Input
+description: FastGPT Form Input node overview
+---
+
+## Characteristics
+
+- User interaction
+- Can be added multiple times
+- Trigger-based execution
+
+
+
+## What It Does
+
+The Form Input node is a user interaction node. When triggered, the conversation enters an "interactive" state -- the workflow state is saved and execution pauses until the user completes the interaction.
+
+
+
+In the example above, when the Form Input node is triggered, the chat box is hidden and the conversation enters interactive mode.
+
+
+
+After the user fills in the required fields and clicks submit, the node collects the form data and passes it to subsequent nodes.
+
+## Use Cases
+
+Precisely collect specific user information, then perform follow-up operations based on that data.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/http.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/http.en.mdx
new file mode 100644
index 0000000000..d4b5f4b4ee
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/http.en.mdx
@@ -0,0 +1,253 @@
+---
+title: HTTP Request
+description: FastGPT HTTP Request node overview
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+## Characteristics
+
+- Can be added multiple times
+- Manual configuration
+- Trigger-based execution
+- Core of core modules
+
+
+
+## Overview
+
+The HTTP node sends an `HTTP` request to a specified URL. It works similarly to tools like Postman and ApiFox.
+
+- Params are query parameters, commonly used in GET requests.
+- Body is the request body, commonly used in POST/PUT requests.
+- Headers are request headers for passing additional information.
+- Custom variables can receive outputs from upstream nodes.
+- All 3 data types support variable references via `{{}}`.
+- The URL also supports `{{}}` variable references.
+- Variables come from `global variables`, `system variables`, and `upstream node outputs`.
+
+## Parameter Structure
+
+### System Variables
+
+Hover over the question mark next to `Request Parameters` to see available variables.
+
+- appId: Application ID
+- chatId: Current conversation ID (not available in test mode)
+- responseChatItemId: Response message ID in the current conversation (not available in test mode)
+- variables: Global variables for the current conversation
+- cTime: Current time
+- histories: Chat history (defaults to max 10 entries, length is not configurable)
+
+### Params, Headers
+
+Usage is the same as Postman and ApiFox.
+
+Use `{{key}}` to reference variables. For example:
+
+| key | value |
+| --- | --- |
+| appId | `{{appId}}` |
+| Authorization | Bearer `{{token}}` |
+
+### Body
+
+Only takes effect with certain request types.
+
+Write a custom JSON body and use `{{key}}` to reference variables. For example:
+
+
+
+
+
+```json
+{
+ "string": "字符串",
+ "number": 123,
+ "boolean": true,
+ "array": [1, 2, 3],
+ "obj": {
+ "name": "FastGPT",
+ "url": "https://fastgpt.io"
+ }
+}
+```
+
+
+
+
+
+
+When referencing a `string` in the Body, wrap it in quotes: `"{{string}}"`.
+
+```json
+{
+ "string": "{{string}}",
+ "token": "Bearer {{string}}",
+ "number": {{number}},
+ "boolean": {{boolean}},
+ "array": [{{number}}, "{{string}}"],
+ "array2": {{array}},
+ "object": {{obj}}
+}
+```
+
+
+
+
+
+
+```json
+{
+ "string": "字符串",
+ "token": "Bearer 字符串",
+ "number": 123,
+ "boolean": true,
+ "array": [123, "字符串"],
+ "array2": [1, 2, 3],
+ "object": {
+ "name": "FastGPT",
+ "url": "https://fastgpt.io"
+ }
+}
+```
+
+
+
+
+
+### Extracting Return Values
+
+As shown in the image, FastGPT lets you add multiple return values. These don't represent the raw API response -- they define `how to parse the API response`. You can use `JSON path` syntax to `extract` values from the response.
+
+Syntax reference: https://github.com/JSONPath-Plus/JSONPath?tab=readme-ov-file
+
+
+
+
+
+```json
+{
+ "message": "测试",
+ "data":{
+ "user": {
+ "name": "xxx",
+ "age": 12
+ },
+ "list": [
+ {
+ "name": "xxx",
+ "age": 50
+ },
+ [{ "test": 22 }]
+ ],
+ "psw": "xxx"
+ }
+}
+```
+
+
+
+
+
+
+```json
+{
+ "$.message": "测试",
+ "$.data.user": { "name": "xxx", "age": 12 },
+ "$.data.user.name": "xxx",
+ "$.data.user.age": 12,
+ "$.data.list": [ { "name": "xxx", "age": 50 }, [{ "test": 22 }] ],
+ "$.data.list[0]": { "name": "xxx", "age": 50 },
+ "$.data.list[0].name": "xxx",
+ "$.data.list[0].age": 50,
+ "$.data.list[1]": [ { "test": 22 } ],
+ "$.data.list[1][0]": { "test": 22 },
+ "$.data.list[1][0].test": 22,
+ "$.data.psw": "xxx"
+}
+```
+
+
+
+
+
+
+Configure the `key` to extract values from FastGPT's parsed format, following standard JavaScript object access rules. For example:
+
+1. To get the `message` content, set the `key` to `message`.
+2. To get the user's name, set the `key` to `data.user.name`.
+3. To get the second element in the list, set the `key` to `data.list[1]`. If you select string as the output type, it will automatically return the JSON string `[ { "test": 22 } ]`.
+
+### Auto-format Output
+
+Starting from FastGPT v4.6.8, output formatting was added, primarily converting `JSON` to `string`. If you select `string` as the output type, the HTTP node will convert the corresponding key's value to a JSON string. This lets you pipe HTTP output directly into a `Text Processing` node, append appropriate prompts, and feed the result into `AI Chat`.
+
+
+
+The HTTP node is extremely versatile. You can integrate public APIs to extend your workflow capabilities.
+
+If you don't want to deploy additional services, use [Laf](https://laf.dev/) to quickly develop and publish APIs -- write and ship instantly with no deployment needed.
+
+
+## Laf HTTP Integration Example
+
+
+Here is a POST request example written in Laf:
+
+```ts
+import cloud from '@lafjs/cloud'
+const db = cloud.database()
+
+type RequestType = {
+ appId: string;
+ appointment: string;
+ action: 'post' | 'delete' | 'put' | 'get'
+}
+
+export default async function (ctx: FunctionContext) {
+ try {
+ // Get parameters from body
+ const { appId, appointment, action } = ctx.body as RequestType
+
+ const parseBody = JSON.parse(appointment)
+ if (action === 'get') {
+ return await getRecord(parseBody)
+ }
+ if (action === 'post') {
+ return await createRecord(parseBody)
+ }
+ if (action === 'put') {
+ return await putRecord(parseBody)
+ }
+ if (action === 'delete') {
+ return await removeRecord(parseBody)
+ }
+
+
+ return {
+ response: "Error"
+ }
+ } catch (err) {
+ return {
+ response: "Error"
+ }
+ }
+}
+```
+
+## Use Cases
+
+The HTTP node enables unlimited extensibility, such as:
+- Database operations
+- External data source calls
+- Web searches
+- Sending emails
+- ....
+
+
+## Related Examples
+
+- [Google Search](/docs/use-cases/app-cases/google_search/)
+- [Send Lark Webhook](/docs/use-cases/app-cases/feishu_webhook/)
+- [Lab Appointment (Database Operations)](/docs/use-cases/app-cases/lab_appointment/)
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/knowledge_base_search_merge.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/knowledge_base_search_merge.en.mdx
new file mode 100644
index 0000000000..ecd20c9dfe
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/knowledge_base_search_merge.en.mdx
@@ -0,0 +1,25 @@
+---
+title: Knowledge Base Search Merge
+description: FastGPT Knowledge Base Search Merge node overview
+---
+
+
+
+
+## What It Does
+
+Merges search results from multiple Knowledge Bases into a single output, re-ranks them using RRF (Reciprocal Rank Fusion), and supports max token filtering.
+
+## Usage
+
+The AI Chat node can only accept one Knowledge Base reference input. If you call multiple Knowledge Bases, you cannot directly reference all of them (as shown below).
+
+
+
+Use **Knowledge Base Search Merge** to combine results from multiple Knowledge Bases into one.
+
+
+
+## Example Use Cases
+
+1. After question classification, search different Knowledge Bases per category, then feed the merged results to a single AI Chat node. This avoids adding a separate AI Chat node to each branch.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/laf.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/laf.en.mdx
new file mode 100644
index 0000000000..6b8be9bff5
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/laf.en.mdx
@@ -0,0 +1,94 @@
+---
+title: Laf Function Call
+description: FastGPT Laf Function Call node overview
+---
+
+
+
+
+## Overview
+
+The `Laf Function Call` node invokes cloud functions under your Laf account. It works the same way as the HTTP node, with these differences:
+
+- Only POST requests are supported
+- Requests automatically include `systemParams` -- no need to pass them via variables
+
+## Bind Your Laf Account
+
+To call Laf cloud functions, you first need to bind your Laf account and application, and create cloud functions within the application.
+
+Laf provides a PAT (Personal Access Token) for authentication outside the Laf platform. See the [Laf documentation](https://doc.Laf.run/zh/cli/#%E7%99%BB%E5%BD%95) for details on obtaining a PAT.
+
+After obtaining a PAT, go to FastGPT's `Account page` or the `Laf module` in the workflow editor to bind your Laf account. The Laf account is shared across the team and can only be configured by team admins.
+
+Enter the PAT for verification, then select the application to bind (the application must be in Running status). You can then call cloud functions under that application.
+
+
+
+## Writing Cloud Functions
+
+Laf cloud functions can auto-generate OpenAPI specs from TypeScript interfaces. Follow the code below to enable automatic OpenAPI documentation generation.
+
+The `Laf module` can automatically detect input/output parameters from the OpenAPI spec, so you don't need to add data types manually. If you're not familiar with TypeScript, you can skip this and add parameters manually in FastGPT.
+
+```ts
+import cloud from '@lafjs/cloud'
+
+interface IRequestBody { // Custom input params. FastGPT always sends POST requests.
+ data1: string // Required parameter
+ data2?: string // Optional parameter
+}
+
+interface RequestProps extends IRequestBody { // Full input params. No changes needed here.
+ systemParams: { // Default parameters passed by FastGPT
+ appId: string,
+ variables: string,
+ histories: string,
+ cTime: string,
+ chatId: string,
+ responseChatItemId: string
+ }
+}
+
+interface IResponse { // Response content
+ message: string // Required return parameter
+ msg?: string; // Optional return parameter
+}
+
+export default async function (ctx: FunctionContext): Promise {
+ const {
+ data1,
+ data2,
+ systemParams
+ }: RequestProps = ctx.body;
+
+ console.log({
+ data1,
+ data2,
+ systemParams
+ });
+
+ return {
+ message: 'ok',
+ msg: 'msg'
+ };
+}
+```
+
+You can also select the `fastgpt_template` on the Laf platform to quickly generate this function template.
+
+To do this, go to the Laf functions page and create a new function (note: FastGPT only calls POST functions). Then either paste the code above or click "More Templates" and search for "fastgpt" to use the template shown below.
+
+
+
+## Using in FastGPT
+
+After selecting a function, click "Sync Parameters" to automatically sync the cloud function's parameters into FastGPT. You can also add parameters manually -- manually modified parameters will not be overwritten by "Sync Parameters".
+
+
+
+## Notes
+
+### Debugging Errors
+
+First debug the function in Laf to verify it works correctly. Use `console.log` to print the input parameters, then paste them into the Body field on Laf's test page to test.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/loop.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/loop.en.mdx
new file mode 100644
index 0000000000..c94020ff7f
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/loop.en.mdx
@@ -0,0 +1,290 @@
+---
+title: Batch Processing
+description: FastGPT Batch Processing node overview and usage
+---
+
+## Node Overview
+
+The **Batch Processing** node was introduced in FastGPT V4.8.11. It allows workflows to iterate over array-type input data, processing one element at a time and automatically executing subsequent nodes until the entire array is processed.
+
+This node is inspired by loop structures in programming languages, presented in a visual format.
+
+
+
+> In programming terms, nodes are like functions or API endpoints -- each one is a **step**. By connecting multiple nodes together, you build a step-by-step process that produces the final AI output.
+
+The **Batch Processing** node is essentially a function whose job is to automate repeated execution of a specific workflow.
+
+## Core Features
+
+1. **Array Batch Processing**
+ - Accepts array-type data input
+ - Automatically iterates through array elements
+ - Maintains processing order
+ - Supports parallel processing for performance optimization
+
+2. **Automatic Iteration**
+ - Automatically triggers downstream nodes
+ - Supports conditional termination
+ - Supports loop counting
+ - Maintains execution context
+
+3. **Works with Other Nodes**
+ - AI Chat nodes
+ - HTTP Request nodes
+ - Content Extraction nodes
+ - Conditional nodes
+
+## Use Cases
+
+The **Batch Processing** node extends workflow capabilities through automation, enabling FastGPT to handle batch tasks and complex data processing pipelines. It significantly improves efficiency when processing large-scale data or scenarios requiring multiple iterations.
+
+The **Batch Processing** node is ideal for:
+
+1. **Batch Data Processing**
+ - Batch text translation
+ - Batch document summarization
+ - Batch content generation
+
+2. **Data Pipeline Processing**
+ - Analyzing search results one by one
+ - Processing Knowledge Base retrieval results individually
+ - Processing array data from HTTP responses item by item
+
+3. **Recursive or Iterative Tasks**
+ - Long text segmented processing
+ - Multi-round content refinement
+ - Chained data processing
+
+## Usage
+
+### Input Parameters
+
+The **Batch Processing** node requires two core inputs:
+
+1. **Array (Required)**: An array-type input, which can be:
+ - String array (`Array`)
+ - Number array (`Array`)
+ - Boolean array (`Array`)
+ - Object array (`Array
)?(?=\\r? \\n\\r?\\n|$))` +
+ "|" +
+ // 11. HTML-like tags and their content (including self-closing tags and attributes, with length constraints)
+ `(?:<[a-zA-Z][^>]{0,${MAX_HTML_TAG_ATTRIBUTES_LENGTH}}(?:>[\\s\\S]{0,${MAX_HTML_TAG_CONTENT_LENGTH}}?[a-zA-Z]+>|\\s*/>))` +
+ "|" +
+ // 12. LaTeX-style math expressions (inline and block, with length constraints)
+ `(?:(?:\\$\\$[\\s\\S]{0,${MAX_MATH_BLOCK_LENGTH}}?\\$\\$)|(?:\\$[^\\$\\r\\n]{0,${MAX_MATH_INLINE_LENGTH}}\\$))` +
+ "|" +
+ // 14. Fallback for any remaining content (with length constraints)
+ `(?!${AVOID_AT_START})${SENTENCE_PATTERN.replace(/{MAX_LENGTH}/g, String(MAX_STANDALONE_LINE_LENGTH))}` +
+ ")",
+ "gmu"
+ );
+
+ function main({text}){
+ const chunks = [];
+ let currentChunk = '';
+ const tokens = countToken(text)
+
+ const matches = text.match(regex);
+ if (matches) {
+ matches.forEach((match) => {
+ if (currentChunk.length + match.length <= 1000) {
+ currentChunk += match;
+ } else {
+ if (currentChunk) {
+ chunks.push(currentChunk);
+ }
+ currentChunk = match;
+ }
+ });
+ if (currentChunk) {
+ chunks.push(currentChunk);
+ }
+ }
+
+ return {chunks, tokens};
+ }
+ ```
+
+ This uses [a powerful regex open-sourced by Jina AI](https://x.com/JinaAI_/status/1823756993108304135) that leverages all possible boundary clues and heuristics for precise text splitting.
+
+2. Configure the Batch Processing node
+
+ 
+
+ - Array input: Select the `chunks` output from the previous Code Execution node.
+ - Add a Code Execution node inside the loop body to format the source text.
+ - Add a Search Glossary node to look up proper nouns from a terminology Knowledge Base before translation.
+ - Add an AI Chat node using CoT (Chain of Thought) to have the LLM explicitly generate a reasoning chain showing the complete translation thought process.
+ - Add a Code Execution node to extract the final translation result from the AI Chat node's last round.
+ - Add a Specified Reply node to output the translated text.
+ - Set the Loop Body End node's output variable to the `result` output from the Extract Translation Text node.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/meta.en.json b/document/content/docs/introduction/guide/dashboard/workflow/meta.en.json
new file mode 100644
index 0000000000..14a59b13cf
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/meta.en.json
@@ -0,0 +1,25 @@
+{
+ "title": "Workflow Nodes",
+ "description": "FastGPT workflow node configuration and usage guide",
+ "pages": [
+ "ai_chat",
+ "dataset_search",
+ "tool",
+ "question_classify",
+ "content_extract",
+ "user-selection",
+ "form_input",
+ "text_editor",
+ "reply",
+ "document_parsing",
+ "http",
+ "tfswitch",
+ "variable_update",
+ "sandbox",
+ "loop",
+ "knowledge_base_search_merge",
+ "coreferenceResolution",
+ "laf",
+ "custom_feedback"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/question_classify.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/question_classify.en.mdx
new file mode 100644
index 0000000000..ed61d0efd3
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/question_classify.en.mdx
@@ -0,0 +1,74 @@
+---
+title: Question Classification
+description: FastGPT Question Classification node overview
+---
+
+## Characteristics
+
+- Can be added multiple times
+- Has external input
+- Requires manual configuration
+- Trigger-based execution
+- function_call module
+
+
+
+## What It Does
+
+Classifies user questions into categories and executes different operations based on the result. Classification may be less effective in ambiguous scenarios.
+
+## Parameters
+
+### System Prompt
+
+Placed at the beginning of the conversation to provide supplementary definitions for classification categories. For example, questions might be classified as:
+
+1. Greetings
+2. Laf FAQs
+3. Other questions
+
+Since "Laf" isn't self-explanatory, you need to define it. The system prompt could include:
+
+```
+Laf is a cloud development platform for rapid application development
+Laf is an open-source BaaS development platform (Backend as a Service)
+Laf is a ready-to-use serverless development platform
+Laf is an all-in-one development platform combining function computing, database, and object storage
+Laf can be thought of as an open-source alternative to Google Firebase or similar cloud development platforms
+```
+
+### Chat History
+
+Adding some chat history enables context-aware classification.
+
+### User Question
+
+The user's input content.
+
+### Classification Categories
+
+Using the same 3 categories as an example, here is the resulting Function composition. The return values are randomly generated by the system and can be ignored.
+
+1. Greetings
+2. Laf FAQs
+3. Other questions
+
+```js
+const agentFunction = {
+ name: agentFunName,
+ description: 'Determine which category the user question belongs to and return the corresponding enum value',
+ parameters: {
+ type: 'object',
+ properties: {
+ type: {
+ type: 'string',
+ description: `Greetings, return: abc; Laf FAQs, return: vvv; Other questions, return: aaa`
+ enum: ["abc","vvv","aaa"]
+ }
+ },
+ required: ['type']
+ }
+};
+```
+
+The Function above always returns one of `type = abc, vvv, aaa`, achieving the classification.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/reply.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/reply.en.mdx
new file mode 100644
index 0000000000..f44e81b8a0
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/reply.en.mdx
@@ -0,0 +1,18 @@
+---
+title: Specified Reply
+description: FastGPT Specified Reply module overview
+---
+
+## Features
+
+- Can be added multiple times (helps keep complex workflows visually clean by avoiding tangled connections)
+- Supports manual input
+- Supports external input
+- Outputs results to the client
+
+The Specified Reply module is typically used for special-case responses. There are two ways to define reply content:
+
+1. Manually enter fixed content.
+2. Use variable references.
+
+
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/sandbox.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/sandbox.en.mdx
new file mode 100644
index 0000000000..6b42d95d92
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/sandbox.en.mdx
@@ -0,0 +1,96 @@
+---
+title: Code Execution
+description: FastGPT Code Execution node overview
+---
+
+
+
+## Function
+
+Runs simple JavaScript code for complex data processing. Code executes in a sandbox with no access to network requests, DOM, or async operations. For advanced use cases, use an HTTP node instead.
+
+**Important Notes**
+
+- Self-hosted users must deploy the `fastgpt-sandbox` image and set the `SANDBOX_URL` environment variable.
+- The sandbox enforces a 10-second max runtime and 32 MB memory limit.
+
+## Variable Input
+
+Add the variables your code needs via custom inputs. In the code's `main` function, destructure them by matching name.
+
+As shown above, the custom inputs include `data1` and `data2`, which can be destructured with the same names in the `main` function.
+
+## Result Output
+
+You must return an object.
+
+In custom outputs, add variable names to retrieve values from the corresponding object keys. For example, the image above returns:
+
+```json
+{
+ result: data1,
+ data2
+}
+```
+
+This object has 2 keys: `result` and `data2` (JS shorthand where key = data2, value = data2). You can then add 2 custom output variables to access the values under each key.
+
+## Built-in JS Global Variables
+
+### delay
+
+Returns after a 1-second delay:
+
+```js
+async function main({data1, data2}){
+ await delay(1000)
+ return {
+ result: "111"
+ }
+}
+```
+
+### countToken
+
+```js
+function main({input}){
+ return {
+ result: countToken(input)
+ }
+}
+```
+
+
+
+### strToBase64 (added in v4.8.11)
+
+Useful for converting SVG images to base64 format for display.
+
+```js
+function main({input}){
+
+ return {
+ /*
+ param1: input - the string to convert
+ param2: base64 prefix
+ */
+ result: strToBase64(input,'data:image/svg+xml;base64,')
+ }
+}
+```
+
+
+
+### createHmac
+
+Works the same as Node.js crypto's `createHmac` method.
+
+```js
+function main({secret}){
+ const {sign,timestamp} = createHmac('sha256',secret)
+
+ return {
+ sign,timestamp
+ }
+}
+```
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/text_editor.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/text_editor.en.mdx
new file mode 100644
index 0000000000..210d5eac8c
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/text_editor.en.mdx
@@ -0,0 +1,27 @@
+---
+title: Text Concatenation
+description: FastGPT Text Concatenation module overview
+---
+
+## Features
+
+- Can be added multiple times
+- Has external inputs
+- Trigger-based execution
+- Manual configuration
+
+
+
+## Function
+
+Applies fixed text processing to inputs. Input parameters only support string and number formats, and are used as variables in the text editing area.
+
+In the example above, any input will have "The user's question is:" prepended to it.
+
+## Use Cases
+
+Provide custom-formatted text to any module, or preprocess system prompts for AI modules.
+
+## Examples
+
+- [Google Search Integration](/docs/use-cases/app-cases/google_search/)
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/tfswitch.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/tfswitch.en.mdx
new file mode 100644
index 0000000000..947b5a9e90
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/tfswitch.en.mdx
@@ -0,0 +1,24 @@
+---
+title: Conditional (IF/ELSE)
+description: FastGPT Conditional module overview
+---
+
+## Features
+
+- Can be added multiple times
+- Has external inputs
+- Trigger-based execution
+
+
+
+## Function
+
+Performs an `IF` evaluation on any variable. If the condition is met, the `IF` branch executes; otherwise the `ELSE` branch runs.
+
+In the example above, if the "Knowledge Base Citation" variable has a length of 0, the `IF` branch executes; otherwise the `ELSE` branch runs.
+
+You can add more conditions and branches, following the same logic as `IF` statements in programming languages.
+
+## Use Cases
+
+Common scenarios include: having the LLM make a judgment and then output fixed content, or checking the LLM's response to decide whether to trigger downstream modules.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/tool.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/tool.en.mdx
new file mode 100644
index 0000000000..12c2793d54
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/tool.en.mdx
@@ -0,0 +1,78 @@
+---
+title: Tool Calling & Termination
+description: FastGPT Tool Calling module overview
+---
+
+
+
+### What is a Tool
+
+A tool can be a built-in module (e.g., AI Chat, Knowledge Base Search, HTTP) or a plugin.
+
+Tool calling lets the LLM dynamically decide the workflow path instead of following a fixed sequence. (The trade-off is higher token consumption.)
+
+### Tool Components
+
+1. **Tool description.** Typically the module or plugin description that tells the LLM what the tool does.
+2. **Tool parameters.** For built-in modules, parameters are fixed and require no extra configuration. For plugins, parameters are configurable.
+
+### How Tools Work
+
+To understand how tools run, you need to know the execution prerequisites:
+
+1. A tool description is required. It tells the LLM what the tool does, and the LLM uses contextual semantics to decide whether to invoke it.
+2. Tool parameters. Some tools require special parameters when called. Each parameter has two key properties: `parameter description` and `required`.
+
+Based on the tool description, parameter descriptions, and whether parameters are required, the LLM decides whether to call the tool. The scenarios are:
+
+1. **Tools without parameters:** The LLM decides based solely on the tool description. Example: get current time.
+2. **Tools with parameters:**
+ 1. No required parameters: The tool can still be called even without suitable context parameters, though the LLM may sometimes fabricate a value.
+ 2. Has required parameters: If no suitable parameters are available, the LLM may skip the tool. Use prompts to guide users into providing the needed parameters.
+
+#### Tool Calling Logic
+
+Models that support `function calling` can invoke multiple tools in a single turn. The calling logic:
+
+
+
+### How to Use
+
+| | |
+| --- | --- |
+|  |  |
+
+In the advanced workflow editor, drag from the tool calling connection point. Eligible tools display a diamond icon at the top, which you can connect to the diamond at the bottom of the tool calling module.
+
+Connected tools automatically separate tool inputs from regular inputs. You can also edit the `description` to fine-tune when the tool gets called.
+
+Debugging tool calling is still more art than science, so start with a small number of tools, optimize them, then gradually add more.
+
+#### Use Cases
+
+By default, after the tool calling node invokes a tool, it returns the tool's output to the AI for summarization. If you don't need the AI to summarize, place this node at the end of the tool's workflow branch.
+
+In the example below, after the Knowledge Base Search runs, results are sent to an HTTP request. The search results are not returned to the tool calling node for AI summarization.
+
+
+
+### Additional Nodes
+
+When you use the tool calling node, a Tool Calling Termination node and a Custom Variable node also become available, further enhancing the tool calling experience.
+
+#### Tool Calling Termination
+
+Tool Calling Termination ends the current call cycle. Place it after a tool node. When the workflow reaches this node, it forcibly ends the current tool call -- no further tools are invoked, and the AI won't generate a summary based on tool results.
+
+
+
+### Custom Tool Variables
+
+Custom variables extend tool input capabilities. For nodes that aren't recognized as tool parameters or can't be directly tool-called, you can define custom tool variables with appropriate parameter descriptions. The tool calling node will then invoke this node and its downstream workflow accordingly.
+
+
+
+### Related Examples
+
+- [Google Search](https://doc.fastgpt.in/docs/use-cases/app-cases/google_search/)
+- [Send Lark Webhook](https://doc.fastgpt.in/docs/use-cases/app-cases/feishu_webhook/)
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/user-selection.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/user-selection.en.mdx
new file mode 100644
index 0000000000..d74b072b08
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/user-selection.en.mdx
@@ -0,0 +1,28 @@
+---
+title: User Selection
+description: FastGPT User Selection module usage guide
+---
+
+## Features
+
+- User interaction
+- Can be added multiple times
+- Trigger-based execution
+
+
+
+## Function
+
+The "User Selection" node is an interactive node. When triggered, the conversation enters an "interactive" state -- the workflow state is saved and execution pauses until the user completes the interaction.
+
+
+
+In the example above, when the User Selection node triggers, the chat input is hidden and the conversation enters interactive mode.
+
+
+
+When the user makes a choice, the node evaluates the selection and executes the corresponding branch (e.g., the "Yes" branch).
+
+## Use Cases
+
+The basic pattern is to present a question that requires a user decision, then route to different workflow paths based on the user's response.
diff --git a/document/content/docs/introduction/guide/dashboard/workflow/variable_update.en.mdx b/document/content/docs/introduction/guide/dashboard/workflow/variable_update.en.mdx
new file mode 100644
index 0000000000..add07122ef
--- /dev/null
+++ b/document/content/docs/introduction/guide/dashboard/workflow/variable_update.en.mdx
@@ -0,0 +1,34 @@
+---
+title: Variable Update
+description: FastGPT Variable Update module overview
+---
+
+## Features
+
+- Can be added multiple times
+- Has external inputs
+- Trigger-based execution
+- Manual configuration
+
+
+
+## Function
+
+- Update the output value of a specified node
+
+
+
+
+
+- Update global variables
+
+
+
+
+
+## Use Cases
+
+Common scenarios include:
+
+- Assign a value to a "Custom Variable" type global variable, so the global variable doesn't require user input
+- Update a workflow node's output upstream of the Variable Update node, so downstream nodes use the new value
diff --git a/document/content/docs/introduction/guide/knowledge_base/RAG.en.mdx b/document/content/docs/introduction/guide/knowledge_base/RAG.en.mdx
new file mode 100644
index 0000000000..64a5ed66d7
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/RAG.en.mdx
@@ -0,0 +1,262 @@
+---
+title: Knowledge Base Fundamentals
+description: This section covers the core mechanisms, application scenarios, advantages, and limitations of the RAG model in generation tasks.
+---
+
+[RAG Documentation](https://huggingface.co/docs/transformers/model_doc/rag)
+
+# 1. Introduction
+
+As natural language processing (NLP) technology has advanced rapidly, generative language models (such as GPT and BART) have excelled at text generation tasks, particularly in language generation and context understanding. However, purely generative models have inherent limitations when handling factual tasks. Since these models rely on fixed pre-training data, they may "hallucinate" — fabricating information when answering questions that require up-to-date or real-time knowledge, leading to inaccurate or unfounded results. Additionally, generative models often struggle with long-tail questions and complex reasoning tasks due to a lack of domain-specific external knowledge.
+
+Meanwhile, retrieval models (Retrievers) can quickly locate relevant information across massive document collections, addressing factual query needs. However, traditional retrieval models (such as BM25) often return isolated results when facing ambiguous queries or cross-domain questions, and cannot generate coherent natural language answers. Without contextual reasoning capabilities, the answers they produce tend to lack coherence and completeness.
+
+To address the shortcomings of both approaches, Retrieval-Augmented Generation (RAG) was developed. RAG combines the strengths of generative and retrieval models by fetching relevant information from external knowledge bases in real time and incorporating it into the generation process. This ensures that generated text is both contextually coherent and factually grounded. This hybrid architecture performs particularly well in intelligent Q&A, information retrieval and reasoning, and domain-specific content generation.
+
+## 1.1 Definition of RAG
+
+RAG is a hybrid architecture that combines information retrieval with generative models. First, the retriever fetches content fragments relevant to the user's query from an external knowledge base or document collection. Then, the generator produces natural language output based on these retrieved fragments, ensuring the output is information-rich, highly relevant, and accurate.
+
+# 2. Core Mechanisms of RAG
+
+RAG models consist of two main modules: the Retriever and the Generator. These modules work together to ensure generated text contains relevant external knowledge while maintaining natural, fluent language.
+
+## 2.1 Retriever
+
+The retriever's primary task is to fetch the most relevant content from an external knowledge base or document collection for a given input query. Common techniques in RAG include:
+
+- Vector retrieval: Using models like BERT to convert documents and queries into vector space representations, then matching them via similarity calculations. Vector retrieval excels at capturing semantic similarity rather than relying solely on lexical matching.
+- Traditional retrieval algorithms: Such as BM25, which uses term frequency and inverse document frequency (TF-IDF) weighted scoring to rank and retrieve documents. BM25 works well for straightforward keyword matching tasks.
+
+The retriever in RAG provides contextual background for the generator, enabling it to produce more relevant answers based on the retrieved document fragments.
+
+## 2.2 Generator
+
+The generator is responsible for producing the final natural language output. Common generators in RAG systems include:
+
+- BART: A sequence-to-sequence model focused on text generation, capable of improving output quality through various noise-handling techniques.
+- GPT series: Pre-trained language models that excel at generating fluent, natural text, particularly strong in generation tasks thanks to large-scale training data.
+
+After receiving document fragments from the retriever, the generator uses them as context alongside the input query to produce relevant, natural text answers. This ensures the output draws on both existing knowledge and the latest external information.
+
+## 2.3 RAG Workflow
+
+The RAG model workflow can be summarized as follows:
+
+1. Input query: The user submits a question, which the system converts to a vector representation.
+2. Document retrieval: The retriever extracts the most relevant document fragments from the knowledge base, typically using vector retrieval or traditional techniques like BM25.
+3. Answer generation: The generator receives the retrieved fragments and produces a natural language answer based on both the original query and the retrieved context, providing richer, more contextually relevant responses.
+4. Output: The generated answer is returned to the user, ensuring they receive an accurate response grounded in relevant, up-to-date information.
+
+# 3. How RAG Works
+
+## 3.1 Retrieval Phase
+
+In RAG, the user's query is first converted to a vector representation, then vector search is performed against the knowledge base. The retriever typically uses pre-trained models like BERT to generate vector representations of both queries and document fragments, matching the most relevant fragments through similarity calculations (such as cosine similarity). RAG's retriever goes beyond simple keyword matching by using semantic-level vector representations, enabling more accurate results even for complex or ambiguous queries. This step is critical because retrieval quality directly determines the context available to the generator.
+
+## 3.2 Generation Phase
+
+The generation phase is the core of RAG. The generator produces coherent, natural text answers based on retrieved content. RAG generators like BART or GPT combine the user's query with retrieved document fragments to produce more precise and comprehensive answers. Unlike traditional generative models, RAG's generator can incorporate factual information from external knowledge bases, improving accuracy.
+
+## 3.3 Multi-Turn Interaction and Feedback
+
+RAG models effectively support multi-turn interactions in dialogue systems. Each round's query and generated results serve as input for the next round. Through this feedback loop, RAG progressively refines its retrieval and generation strategies, producing increasingly relevant answers across multiple conversation turns. This also enhances RAG's adaptability in complex dialogue scenarios involving cross-turn knowledge integration and reasoning.
+
+# 4. Advantages and Limitations of RAG
+
+## 4.1 Advantages
+
+- Information completeness: RAG combines retrieval and generation, producing text that is both naturally fluent and grounded in real-time information from external knowledge bases. This significantly improves accuracy in knowledge-intensive scenarios like medical Q&A or legal opinion generation, avoiding the risk of hallucinated information.
+- Knowledge reasoning: RAG can efficiently retrieve from large-scale external knowledge bases and reason with real data to generate fact-based answers. Compared to traditional generative models, RAG handles more complex tasks, particularly cross-domain or cross-document reasoning — such as legal case analysis or financial report generation.
+- Strong domain adaptability: RAG adapts well across domains, performing efficient retrieval and generation within specific fields. In domains like healthcare, law, and finance that require real-time updates and high accuracy, RAG outperforms models that rely solely on pre-training.
+
+## 4.2 Limitations
+
+Despite its strong potential and cross-domain adaptability, RAG faces several key limitations in practice that constrain large-scale deployment and optimization:
+
+#### 4.2.1 Retriever Dependency and Quality Issues
+
+RAG performance depends heavily on the quality of documents returned by the retriever. If retrieved fragments are irrelevant or inaccurate, the generated text may be biased or misleading — especially with ambiguous queries or cross-domain retrieval.
+
+- Challenge: Improving retriever precision for complex queries across large, diverse knowledge bases remains difficult. Methods like BM25 have limitations, particularly with semantically ambiguous queries where keyword matching falls short.
+- Solution: Adopt hybrid retrieval combining sparse retrieval (BM25) with dense retrieval (vector search). For example, Faiss enables BERT-based dense vector representations that significantly improve semantic matching, reducing the impact of irrelevant documents on generation.
+
+#### 4.2.2 Generator Computational Complexity and Performance Bottlenecks
+
+Combining retrieval and generation modules significantly increases computational complexity. When processing large datasets or long texts, the generator must integrate information from multiple document fragments, increasing generation time and reducing inference speed. This is a major bottleneck for real-time Q&A systems.
+
+- Challenge: As knowledge base scale grows, both retrieval computation and the generator's multi-fragment integration capabilities significantly impact system efficiency. GPU and memory consumption can multiply in multi-turn dialogues or complex generation tasks.
+- Solution: Use model compression and knowledge distillation to reduce generator complexity and inference time. Distributed computing and model parallelization techniques like [DeepSpeed](https://www.deepspeed.ai/) can effectively handle high computational demands in large-scale scenarios.
+
+#### 4.2.3 Knowledge Base Updates and Maintenance
+
+RAG models typically rely on a pre-built external knowledge base containing documents, papers, legal provisions, and other information. The timeliness and accuracy of this content directly affects the credibility of generated results. Over time, knowledge base content may become outdated, producing answers that don't reflect current information — particularly problematic in fast-moving fields like healthcare and finance.
+
+- Challenge: Knowledge bases need frequent updates, but manual updates are time-consuming and error-prone. Implementing continuous automated updates without impacting system performance is a significant challenge.
+- Solution: Use automated crawlers and information extraction systems (such as Scrapy) to automatically fetch and update knowledge base content. Combined with [dynamic indexing techniques](https://arxiv.org/pdf/2102.03315), retrievers can update indexes in real time. Incremental learning allows the generator to gradually absorb new information, avoiding outdated answers.
+
+#### 4.2.4 Generated Content Controllability and Transparency
+
+RAG models have controllability and transparency challenges. In complex tasks or with ambiguous user input, the generator may produce incorrect reasoning based on inaccurate document fragments. Due to RAG's "black box" nature, users find it difficult to understand how the generator uses retrieved information — a significant concern in sensitive domains like law and healthcare, potentially eroding user trust.
+
+- Challenge: Insufficient model transparency makes it hard for users to verify the source and credibility of generated answers. For tasks requiring high explainability (medical consultations, legal advice), inability to trace answer sources undermines trust.
+- Solution: Introduce explainable AI (XAI) techniques like LIME or SHAP ([link](https://github.com/marcotcr/lime)) to provide detailed provenance for each generated answer, showing which knowledge fragments were referenced. Additionally, rule constraints and user feedback mechanisms can progressively optimize generator output for greater trustworthiness.
+
+# 5. RAG Improvement Directions
+
+RAG model performance depends on knowledge base accuracy and retrieval efficiency. Optimizing data collection, content chunking, retrieval precision, and answer generation are key to improving overall effectiveness.
+
+## 5.1 Data Collection and Knowledge Base Construction
+
+RAG's core dependency is knowledge base data quality and breadth — the knowledge base serves as "external memory." A high-quality knowledge base should include content from diverse, authoritative sources such as scientific literature databases (PubMed, IEEE Xplore), established news media, and industry standards and reports. It also needs automated update capabilities to stay current.
+
+- Challenges:
+ - Single or limited data sources leading to insufficient coverage across domains
+ - Inconsistent data quality from non-authoritative or low-quality sources introducing bias
+ - Lack of regular update mechanisms, especially in fast-changing fields like law, finance, and technology
+ - Time-consuming and error-prone data processing workflows
+ - Data sensitivity and privacy concerns in domains like healthcare, law, and finance
+
+- Improvements:
+ - Expand data source coverage across multiple domains, including specialized databases like PubMed, LexisNexis, and financial databases
+ - Build data quality review and filtering mechanisms using automated detection algorithms combined with manual review
+ - Implement automated knowledge base updates using web crawlers with change detection algorithms
+ - Adopt efficient data cleaning and classification using NLP techniques like BERT for entity recognition and text denoising
+ - Strengthen data security with de-identification, anonymization, and differential privacy protection
+ - Standardize data formats using JSON, XML, or knowledge graphs for structured storage
+ - Incorporate user feedback mechanisms to continuously optimize knowledge base content
+
+## 5.2 Data Chunking and Content Management
+
+Proper chunking strategies help models efficiently locate target information and provide clear context during answer generation. Chunking by paragraph, section, or topic improves retrieval efficiency and prevents redundant data from interfering with generation — especially important in complex, long-form text.
+
+- Challenges:
+ - Unreasonable chunking breaking information chains and context
+ - Redundant data causing repetitive or overloaded generated content
+ - Inappropriate chunk granularity affecting retrieval precision
+ - Difficulty implementing topic-based or logic-based chunking for complex texts
+
+- Improvements:
+ - Use NLP techniques (syntactic analysis, semantic segmentation) for automated, logic-based chunking
+ - Apply deduplication and information consolidation using similarity algorithms (TF-IDF, cosine similarity)
+ - Dynamically adjust chunk granularity based on task requirements
+ - Introduce topic-based chunking using topic models (LDA) or embedding-based text clustering
+ - Implement feedback mechanisms to continuously evaluate and optimize chunking strategies
+
+## 5.3 Retrieval Optimization
+
+The retrieval module determines the relevance and accuracy of generated answers. Hybrid retrieval strategies (combining BM25 and DPR) complement each other — BM25 handles keyword matching efficiently while DPR excels at deep semantic understanding.
+
+- Challenges:
+ - Single retrieval strategies causing answer bias
+ - Tension between retrieval efficiency and resource consumption
+ - Redundant retrieval results leading to repetitive content
+ - Poor adaptability of fixed retrieval strategies across different task types
+
+- Improvements:
+ - Combine BM25 and DPR in a hybrid retrieval strategy — BM25 for initial keyword filtering, then DPR for deep semantic matching
+ - Optimize retrieval efficiency using caching for frequent queries and distributed computing for parallel processing
+ - Apply deduplication and ranking optimization algorithms to retrieval results
+ - Dynamically adjust retrieval strategies based on task type — favoring semantic retrieval for medical Q&A, keyword matching for news scenarios
+ - Integrate retrieval optimization frameworks like Haystack for enhanced extensibility
+
+## 5.4 Answer Generation and Optimization
+
+The generator produces natural language answers based on retrieved context. Accuracy and logical coherence directly impact user experience. Knowledge graphs and structured information help the generator better understand and connect context for more coherent, accurate answers.
+
+- Challenges:
+ - Insufficient context leading to logically incoherent answers
+ - Inadequate accuracy in specialized domain answers
+ - Difficulty effectively integrating multi-turn user feedback
+ - Insufficient controllability and consistency in generated content
+
+- Improvements:
+ - Integrate knowledge graphs and structured data to enhance context understanding
+ - Design domain-specific generation rules and terminology constraints
+ - Optimize user feedback mechanisms for dynamic generation logic adjustment
+ - Implement collaborative optimization between generator and retriever — allowing the generator to request additional context as needed
+ - Apply consistency detection and semantic correction to ensure uniform terminology and logical structure
+
+## 5.5 RAG Pipeline
+
+
+
+1. Data loading and query input:
+ 1. The user submits a natural language query through the UI or API.
+ 2. The input is passed to a vectorizer (such as BERT or Sentence Transformer) to convert the query into a vector representation.
+2. Document retrieval:
+ 1. The vectorized query is passed to the retriever, which finds the most relevant document fragments in the knowledge base.
+ 2. Retrieval can use sparse techniques (BM25) or dense techniques (DPR) for improved matching efficiency and precision.
+3. Generator processing and natural language generation:
+ 1. Retrieved document fragments are fed to the generator (such as GPT, BART, or T5), which produces a natural language answer based on the query and document content.
+ 2. The generator combines external retrieval results with pre-trained language knowledge for more precise, natural answers.
+4. Result output:
+ 1. The generated answer is returned to the user via API or UI, ensuring coherence and factual accuracy.
+5. Feedback and optimization:
+ 1. Users can provide feedback on generated answers, which the system uses to optimize retrieval and generation.
+ 2. Through model fine-tuning or retrieval weight adjustments, the system progressively improves accuracy and efficiency.
+
+# 6. RAG Case Studies
+
+[RAG Across Various Domains](https://github.com/hymie122/RAG-Survey)
+
+# 7. RAG Applications
+
+RAG models have been widely adopted across multiple domains:
+
+## 7.1 Intelligent Q&A Systems
+
+- RAG generates accurate, detailed answers by retrieving from external knowledge bases in real time, avoiding the hallucination issues of traditional generative models. For example, in medical Q&A systems, RAG can incorporate the latest medical literature to generate answers with current treatment protocols, helping medical professionals quickly access the latest research and clinical recommendations.
+ - [Medical Q&A System Case Study](https://www.apexon.com/blog/empowering-discovery-the-role-of-rag-architecture-generative-ai-in-healthcare-life-sciences/)
+ - 
+ - User submits a query through the web application:
+ 1. The user enters a query in the web app, which enters the backend system and initiates the data processing pipeline.
+ - Authentication via Azure AD:
+ 1. The system authenticates the user through Azure Active Directory (Azure AD), ensuring only authorized users can access the system and data.
+ - User permission check:
+ 1. The system filters accessible content based on user group permissions managed by Azure AD.
+ - Azure AI Search Service:
+ 1. The filtered query is passed to Azure AI Search, which finds relevant content in indexed databases or documents using semantic search.
+ - Document intelligence processing:
+ 1. The system uses OCR and document extraction to convert unstructured data into structured, searchable data for Azure AI retrieval.
+ - Document sources:
+ 1. Documents come from pre-stored collections that have been processed and indexed before user queries.
+ - Azure OpenAI generates response:
+ 1. After retrieving relevant information, data is passed to Azure OpenAI, which uses natural language generation (NLG) to produce a coherent answer based on the query and retrieval results.
+ - Response returned to user:
+ 1. The final answer is returned through the web application, completing the query-to-response flow.
+ - The entire pipeline demonstrates Azure AI technology integration, handling complex queries through document retrieval, intelligent processing, and natural language generation while ensuring data security and compliance.
+
+## 7.2 Information Retrieval and Text Generation
+
+- Text generation: RAG can not only retrieve relevant documents but also generate summaries, reports, or document abstracts, enhancing coherence and accuracy. For example, in the legal domain, RAG can integrate relevant statutes and case law to generate detailed legal opinions, ensuring comprehensiveness and rigor — particularly valuable for lawyers and legal practitioners to improve efficiency.
+ - [Legal Domain RAG Case Study](https://www.apexon.com/blog/empowering-discovery-the-role-of-rag-architecture-generative-ai-in-healthcare-life-sciences/)
+ - Summary:
+ - Background: Traditional LLMs perform well in generation tasks but have limitations with complex legal tasks. Legal documents have unique structures and terminology that standard retrieval benchmarks often fail to capture. LegalBench-RAG aims to provide a dedicated benchmark for evaluating legal document retrieval.
+ - LegalBench-RAG structure:
+ 1. 
+ 2. Workflow:
+ 3. User inputs a question (Q: ?, A: ?): The user submits a query through the interface.
+ 4. Embed + Retrieve module: Receives the query, embeds it as a vector, and performs similarity search in external knowledge bases or documents.
+ 5. Answer generation (A): Based on the most relevant retrieved information, the generation model produces a coherent natural language answer.
+ 6. Compare and return results: The generated answer is compared with previous related answers and returned to the user.
+ 7. The benchmark is built on the LegalBench dataset with 6,858 query-answer pairs traced to exact locations in original legal documents.
+ 8. LegalBench-RAG focuses on precisely retrieving small passages from legal texts rather than broad, contextually irrelevant fragments.
+ 9. The dataset covers various legal document types including contracts and privacy policies, ensuring coverage across multiple legal scenarios.
+ - Significance: LegalBench-RAG is the first publicly available benchmark specifically for legal retrieval systems, providing a standardized framework for comparing retrieval algorithms in high-precision legal tasks such as citation lookup and clause interpretation.
+ - Key challenges:
+ 1. RAG's generation component depends on retrieved information — incorrect retrieval can lead to incorrect generation.
+ 2. The length and terminological complexity of legal documents increase retrieval and generation difficulty.
+ - Quality control: The dataset construction process ensures high-quality human annotations and textual precision, with multiple rounds of manual verification when mapping annotation categories and document IDs to specific text fragments.
+
+## 7.3 Other Applications
+
+RAG can also be applied to multimodal generation scenarios, including image, audio, and 3D content generation. Cross-modal applications like ReMoDiffuse and Make-An-Audio leverage RAG technology for generation across different data modalities. In enterprise decision support, RAG can rapidly retrieve external resources (industry reports, market data) to generate high-quality forward-looking reports, enhancing strategic decision-making capabilities.
+
+## 8. Summary
+
+This document systematically covers the core mechanisms, advantages, and applications of Retrieval-Augmented Generation (RAG). By combining generative and retrieval models, RAG addresses the hallucination problem of traditional generative models in factual tasks and the inability of retrieval models to produce coherent natural language output. RAG models retrieve information from external knowledge bases in real time, generating content that is both factually accurate and linguistically fluent — applicable to knowledge-intensive domains like healthcare, law, and intelligent Q&A systems.
+
+In practice, while RAG offers significant advantages in information completeness, reasoning capability, and cross-domain adaptability, it also faces challenges around data quality, computational resource consumption, and knowledge base maintenance. To further improve RAG performance, this document proposes comprehensive improvements across data collection, content chunking, retrieval strategy optimization, and answer generation — including knowledge graph integration, user feedback optimization, and efficient deduplication algorithms — to enhance model applicability and efficiency.
+
+RAG has demonstrated strong potential in intelligent Q&A, information retrieval, and text generation, and continues to expand into multimodal generation and enterprise decision support. Through hybrid retrieval techniques, knowledge graphs, and dynamic feedback mechanisms, RAG can flexibly address complex user needs, generating factually grounded and logically coherent answers. Going forward, RAG will further improve trustworthiness and practicality in specialized domains through enhanced model transparency and controllability, providing broader applications for intelligent information retrieval and content generation.
diff --git a/document/content/docs/introduction/guide/knowledge_base/api_dataset.en.mdx b/document/content/docs/introduction/guide/knowledge_base/api_dataset.en.mdx
new file mode 100644
index 0000000000..515080fcb8
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/api_dataset.en.mdx
@@ -0,0 +1,183 @@
+---
+title: API File Library
+description: Introduction and usage of the FastGPT API File Library
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+| | |
+| --- | --- |
+|  |  |
+
+## Background
+
+FastGPT supports local file imports, but in many cases users already have an existing document library. Re-importing files would create duplicate storage and complicate management. To address this, FastGPT offers an API File Library that connects to your existing document library through simple API endpoints, with flexible import options.
+
+The API File Library lets you integrate your existing document library seamlessly. Implement a few endpoints that conform to FastGPT's API File Library specification, provide the service's baseURL and token when creating a knowledge base, and you can browse and selectively import files directly from the UI.
+
+## How to Use the API File Library
+
+When creating a knowledge base, select the API File Library type and configure two key parameters: the baseURL of your file service and the request header for authentication. As long as your endpoints conform to FastGPT's specification, the system will automatically fetch and display the complete file list for selective import.
+
+You need to provide two parameters:
+- baseURL: The base URL of your file service
+- authorization: The authentication request header, sent as `Authorization: Bearer `
+
+## API Specification
+
+Response format:
+
+```ts
+type ResponseType = {
+ success: boolean;
+ message: string;
+ data: any;
+}
+```
+
+Data types:
+
+```ts
+// Single file item in the file list
+type FileListItem = {
+ id: string;
+ parentId: string | null;
+ name: string;
+ type: 'file' | 'folder';
+ updateTime: Date;
+ createTime: Date;
+}
+```
+
+
+### 1. Get File Tree
+
+
+
+
+
+
+- parentId - Parent ID, optional or null.
+- searchKey - Search keyword, optional
+
+
+```bash
+curl --location --request POST '{{baseURL}}/v1/file/list' \
+--header 'Authorization: Bearer {{authorization}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "parentId": null,
+ "searchKey": ""
+}'
+```
+
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "success": true,
+ "message": "",
+ "data": [
+ {
+ "id": "xxxx",
+ "parentId": "xxxx",
+ "type": "file", // file | folder
+ "name":"test.json",
+ "updateTime":"2024-11-26T03:05:24.759Z",
+ "createTime":"2024-11-26T03:05:24.759Z"
+ }
+ ]
+}
+```
+
+
+
+
+
+### 2. Get Single File Content (Text Content or Access Link)
+
+
+
+
+
+```bash
+curl --location --request GET '{{baseURL}}/v1/file/content?id=xx' \
+--header 'Authorization: Bearer {{authorization}}'
+```
+
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "success": true,
+ "message": "",
+ "data": {
+ "title": "Document Title",
+ "content": "FastGPT is an LLM-based knowledge base Q&A system with out-of-the-box data processing and model invocation capabilities. It also supports visual workflow orchestration via Flow for complex Q&A scenarios!\n",
+ "previewUrl": "xxxx"
+ }
+}
+```
+
+
+
+- title - File title.
+- content - File content, used directly.
+- previewUrl - File link; the system will request this URL to fetch the file content.
+
+Return either `content` or `previewUrl`. If both are returned, `content` takes priority. When `previewUrl` is returned, the system will access that link to read the document content.
+
+
+
+
+
+
+
+
+### 3. Get File Read Link (for Viewing the Original)
+
+
+
+
+
+id is the file's ID.
+
+```bash
+curl --location --request GET '{{baseURL}}/v1/file/read?id=xx' \
+--header 'Authorization: Bearer {{authorization}}'
+```
+
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "success": true,
+ "message": "",
+ "data": {
+ "url": "xxxx"
+ }
+}
+```
+
+
+- url - File access link; opens automatically once retrieved.
+
+
+
+
+
diff --git a/document/content/docs/introduction/guide/knowledge_base/collection_tags.en.mdx b/document/content/docs/introduction/guide/knowledge_base/collection_tags.en.mdx
new file mode 100644
index 0000000000..821b6be373
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/collection_tags.en.mdx
@@ -0,0 +1,46 @@
+---
+title: Knowledge Base Collection Tags
+description: How to use collection tags in FastGPT Knowledge Base
+---
+
+Collection tags are a commercial-edition feature in FastGPT. They let you tag and categorize data collections within a knowledge base for more efficient data management.
+
+You can also use tags as collection filters during knowledge base searches for more precise results.
+
+| | | |
+| --------------------- | --------------------- | --------------------- |
+|  |  |  |
+
+## Basic Tag Operations
+
+On the knowledge base detail page, you can manage tags with the following operations:
+
+- Create a tag
+- Rename a tag
+- Delete a tag
+- Assign a tag to multiple collections
+- Add multiple tags to a single collection
+
+You can also filter collections by tags.
+
+## Collection Filtering in Knowledge Base Search
+
+Tags can be used to filter collections during knowledge base searches by filling in the "Collection Filter" field. Here's an example:
+
+```json
+{
+ "tags": {
+ "$and": ["Tag 1","Tag 2"],
+ "$or": ["When $and tags are present, $and takes effect and $or is ignored"]
+ },
+ "createTime": {
+ "$gte": "YYYY-MM-DD HH:mm format, matches collections created after this time",
+ "$lte": "YYYY-MM-DD HH:mm format, matches collections created before this time. Can be used together with $gte"
+ }
+}
+```
+
+Two important notes:
+
+- Tag values can be a `string` tag name or `null`, where `null` represents collections with no tags assigned
+- There are two filter condition types: `$and` and `$or`. When both are set, only `$and` takes effect
diff --git a/document/content/docs/introduction/guide/knowledge_base/dataset_engine.en.mdx b/document/content/docs/introduction/guide/knowledge_base/dataset_engine.en.mdx
new file mode 100644
index 0000000000..6e0440df6e
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/dataset_engine.en.mdx
@@ -0,0 +1,134 @@
+---
+title: Knowledge Base Search Methods and Parameters
+description:
+ This section covers FastGPT's knowledge base architecture, including its QA
+ storage format and multi-vector mapping, to help you build better knowledge bases. It also explains each search parameter. This guide focuses on practical usage rather than in-depth theory.
+---
+
+## Understanding Vectors
+
+FastGPT uses an Embedding-based RAG approach for its knowledge base. To use FastGPT effectively, you need a basic understanding of how `Embedding` vectors work and their characteristics.
+
+Human text, images, videos, and other media cannot be directly understood by computers. To determine whether two pieces of text are similar or related, they typically need to be converted into a computer-readable format — vectors are one such method.
+
+A vector is essentially an array of numbers. The "distance" between two vectors can be calculated using mathematical formulas — the smaller the distance, the more similar the vectors. This maps back to text, images, videos, and other media to measure similarity between them. Vector search leverages this principle.
+
+Since text comes in many types with countless combinations, exact matching is hard to guarantee when converting to vectors for similarity comparison. In vector-based knowledge bases, a `top-k` recall approach is typically used — finding the top `k` most similar results and passing them to an LLM for further `semantic evaluation`, `logical reasoning`, and `summarization`, enabling knowledge base Q&A. This makes vector search the most critical step in the process.
+
+Many factors affect vector search accuracy, including: vector model quality, data quality (length, completeness, diversity), and retriever precision (the speed vs. accuracy tradeoff). Search query quality is equally important.
+
+Retriever precision is relatively straightforward to address, and training vector models is more complex, so optimizing data and query quality becomes a key focus.
+
+
+### Improving Vector Search Accuracy
+
+1. Better tokenization and chunking: When a text segment has complete and singular structure and semantics, accuracy improves. Many systems optimize their tokenizers to preserve data completeness.
+2. Streamline `index` content by reducing vector content length: Shorter, more precise `index` content improves search accuracy, though it may narrow the search scope. Best suited for scenarios requiring strict answers.
+3. Increase `index` quantity: Add multiple `index` entries for the same `chunk` to improve recall.
+4. Optimize search queries: In practice, user questions are often vague or incomplete. Refining the query (search term) can significantly improve accuracy.
+5. Fine-tune vector models: Off-the-shelf vector models are general-purpose and may underperform in specific domains. Fine-tuning can greatly improve domain-specific search results.
+
+## FastGPT Knowledge Base Architecture
+
+### Data Storage Structure
+
+In FastGPT, a knowledge base consists of three parts: libraries, collections, and data entries. A collection can be thought of as a "file." A library can contain multiple collections, and a collection can contain multiple data entries. The smallest searchable unit is the library — searches span the entire library. Collections are only for organizing and managing data and do not affect search results (at least for now).
+
+
+
+### Vector Storage Structure
+
+FastGPT uses `PostgreSQL`'s `PG Vector` extension as the vector retriever, with `HNSW` indexing. `PostgreSQL` is used solely for vector search (this engine can be swapped for other databases), while `MongoDB` handles all other data storage.
+
+In `MongoDB`'s `dataset.datas` collection, vector source data is stored along with an `indexes` field that records corresponding vector IDs. This is an array, meaning a single data entry can map to multiple vectors.
+
+In `PostgreSQL`, a `vector` field stores the vectors. During search, vectors are recalled first, then their IDs are used to look up the original data in `MongoDB`. If multiple vectors map to the same source data, they are merged and the highest vector score is used.
+
+
+
+### Purpose and Usage of Multi-Vector Mapping
+
+In a single vector, content length and semantic richness are often at odds. FastGPT uses multi-vector mapping to map a single data entry to multiple vectors, preserving both data completeness and semantic richness.
+
+You can add multiple vectors to a longer text so that if any one vector is matched during search, the entire data entry is recalled.
+
+This means you can continuously improve data chunk accuracy through annotation.
+
+### Search Pipeline
+
+1. Use `Query Optimization` for coreference resolution and query expansion, improving multi-turn conversation search capability and semantic richness.
+2. Use `Concat Query` to improve `Rerank` accuracy during multi-turn conversations.
+3. Use `RRF` (Reciprocal Rank Fusion) to merge results from multiple search channels.
+4. Use `Rerank` for secondary sorting to improve precision.
+
+
+
+
+## Search Parameters
+| | | |
+| --- |---| --- |
+||  |  |
+
+### Search Modes
+
+#### Semantic Search
+
+Semantic search calculates the vector distance between the user's query and knowledge base content to determine "similarity" — mathematical similarity, not linguistic.
+
+Pros:
+- Understands similar semantics
+- Cross-language understanding (e.g., Chinese query matching English content)
+- Multimodal understanding (text, images, audio/video, etc.)
+
+Cons:
+- Depends on model training quality
+- Inconsistent accuracy
+- Affected by keywords and sentence completeness
+
+#### Full-Text Search
+
+Uses traditional full-text search. Best for finding key subjects, predicates, and other specific terms.
+
+#### Hybrid Search
+
+Combines vector search and full-text search, merging results using the RRF formula. Generally produces richer and more accurate results.
+
+Since hybrid search covers a large range and cannot directly filter by similarity, a rerank model is typically used to re-sort results and filter by rerank scores.
+
+#### Result Reranking
+
+Uses a `ReRank` model to re-sort search results. In most cases, this significantly improves accuracy. Rerank models work better with complete questions (with proper subjects and predicates), so query optimization is usually applied before search and reranking. Reranking produces a score between `0-1` representing the relevance between the search content and the query — this score is typically more accurate than vector similarity scores and can be used for filtering.
+
+FastGPT uses `RRF` to merge rerank results, vector search results, and full-text search results into the final output.
+
+### Search Filters
+
+#### Reference Limit
+
+The maximum number of `tokens` to reference per search.
+
+Instead of using `top k`, we found that in mixed knowledge bases (Q&A + document), different `chunk` lengths vary significantly, making `top k` results unstable. Using a `token` limit provides more consistent control.
+
+#### Minimum Relevance
+
+A value between `0-1` that filters out low-relevance search results.
+
+This only takes effect when using `Semantic Search` or `Result Reranking`.
+
+### Query Optimization
+
+#### Background
+
+In RAG, we need to perform embedding searches against the database based on the input query to find similar content (i.e., knowledge base search).
+
+During search — especially in multi-turn conversations — follow-up questions often fail to find relevant content because knowledge base search only uses the "current" question. Consider this example:
+
+
+
+When the user asks "What's the second point?", the system searches for "What's the second point?" in the knowledge base, which returns nothing useful. The actual query should be "What is the QA structure?". This is why we need a Query Optimization module to complete the user's current question, enabling the knowledge base search to find relevant content. Here's the result after optimization:
+
+
+
+#### How It Works
+
+Before performing `data retrieval`, the model first performs `coreference resolution` and `query expansion`. This resolves ambiguous references and enriches the query's semantic content. You can view the optimized query in the conversation details after each interaction.
diff --git a/document/content/docs/introduction/guide/knowledge_base/lark_dataset.en.mdx b/document/content/docs/introduction/guide/knowledge_base/lark_dataset.en.mdx
new file mode 100644
index 0000000000..c16dccd052
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/lark_dataset.en.mdx
@@ -0,0 +1,58 @@
+---
+title: Lark Knowledge Base
+description: Introduction and usage of the FastGPT Lark Knowledge Base
+---
+
+| | |
+| --- | --- |
+|  |  |
+
+Starting from FastGPT v4.8.16, commercial edition users can import from Lark knowledge bases. Configure a Lark app's appId and appSecret, then select a **top-level folder in a document space** to import. This feature is currently in beta — some interactions may still need refinement.
+
+Due to Lark API limitations, you cannot directly access all document content. Currently, only files in shared space directories are accessible — personal spaces and wiki content are not supported.
+
+Only cloud document types are supported for import.
+
+
+## 1. Create a Lark App
+
+Go to the [Lark Open Platform](https://open.feishu.cn/?lang=zh-CN), click **Create App**, select **Custom App**, and fill in the app name.
+
+## 2. Configure App Permissions
+
+After creating the app, configure the following **3 permissions**:
+
+1. View the list of cloud documents in a folder
+2. View new-format documents
+3. View, comment, edit, and manage all files in the cloud space
+
+
+
+## 3. Get the appId and appSecret
+
+
+
+## 4. Grant Folder Permissions
+
+Refer to the Lark tutorial: https://open.feishu.cn/document/server-docs/docs/drive-v1/faq#b02e5bfb
+
+In summary:
+
+1. Add the app you just created to a group chat
+2. Grant directory permissions to that group
+
+If your directory already has permissions granted to the "All Members" group, you can skip the steps above and go directly to getting the Folder Token.
+
+
+
+## 5. Get the Folder Token
+
+You can find the Folder Token in the page URL. Make sure not to include the question mark.
+
+
+
+## 6. Create the Knowledge Base
+
+Using the 3 parameters obtained from steps 3 and 5, create a knowledge base. Select the Lark file library type, fill in the parameters, and click Create.
+
+
diff --git a/document/content/docs/introduction/guide/knowledge_base/meta.en.json b/document/content/docs/introduction/guide/knowledge_base/meta.en.json
new file mode 100644
index 0000000000..9e13f77f01
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/meta.en.json
@@ -0,0 +1,15 @@
+{
+ "title": "Knowledge Base",
+ "description": "Basic principles of knowledge base, search solutions, web site synchronization, and usage methods for external file knowledge bases.",
+ "pages": [
+ "RAG",
+ "dataset_engine",
+ "collection_tags",
+ "api_dataset",
+ "lark_dataset",
+ "yuque_dataset",
+ "websync",
+ "third_dataset",
+ "template"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/knowledge_base/template.en.mdx b/document/content/docs/introduction/guide/knowledge_base/template.en.mdx
new file mode 100644
index 0000000000..8a427795a1
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/template.en.mdx
@@ -0,0 +1,113 @@
+---
+title: Template Import
+description: Introduction and usage of the FastGPT template import feature
+---
+
+## Background
+
+FastGPT provides a template import feature that lets you batch-import Q&A pair data using a predefined CSV template format. This is especially useful if you already have structured Q&A data and want to quickly load it into a knowledge base.
+
+## Template Structure
+
+The template uses CSV format with the following columns:
+
+- q: Question column — stores questions users might ask
+- a: Answer column — stores the corresponding answers
+- indexes: Index column — stores related indexes for the question
+
+### Example Data
+
+```csv
+q,a,indexes
+"Who are you?","I'm an AI assistant, always here to chat with you, answer your questions, discuss topics, address everyday queries, or brainstorm creative ideas. I do my best to help using my 'knowledge brain' — I hope to be your go-to partner for exploring and learning!","1. What are you?\n2. What can you do?\n3. What kinds of questions can you answer?\n4. What kind of partner do you want to be?\n5. How do you provide help?"
+"What are you?","I'm an AI assistant, always ready to chat with users and answer their questions. I can participate in knowledge discussions, address everyday queries, and brainstorm creative ideas, providing help and companionship through my 'knowledge brain'. I hope to be a great partner for interaction and exploration.","What are you?"
+"What can you do?","I can chat with users, answer questions, participate in knowledge discussions, address everyday queries, and brainstorm creative ideas, providing help and companionship through my 'knowledge brain'.","What can you do?"
+```
+
+## Usage Instructions
+
+### 1. Open the Knowledge Base, Click Import, and Select Template Import
+
+
+
+
+
+### 2. Download the Template
+
+Click to download the CSV template. It contains two content modes:
+
+#### Standard Mode Template
+
+
+
+Corresponding CSV format:
+
+
+
+In standard mode, q is the content, a is empty, and indexes can have multiple entries.
+
+#### Q&A Pair Mode Template
+
+
+
+Corresponding CSV format:
+
+
+
+In Q&A pair mode, q is the question, a is the answer, and indexes are the index entries.
+
+### 3. Fill in Your Data
+
+Fill in your Q&A data following the template format:
+- Each row represents one content entry or one Q&A pair
+- The question (q) must never be empty
+- Within a row, you can add more index entries by extending columns to the right
+
+### 4. Import Limits
+
+- Only CSV format files are supported
+- Maximum file size is 100MB
+- Data must strictly follow the template format, otherwise import may fail
+- Only one file can be imported at a time
+
+After a successful import:
+
+
+
+### 4. Important Notes
+
+- Ensure the CSV file uses UTF-8 encoding
+- If content contains commas, wrap the entire value in double quotes
+- The indexes column is used as search indexes for related questions, helping improve retrieval accuracy
+- We recommend testing with a small dataset before importing large amounts of data
+
+## Best Practices
+
+1. **Data Preparation**
+ - Ensure content or Q&A pair quality — answers should be clear and accurate
+ - Add appropriate index keywords for each import entry
+ - Avoid duplicate content or Q&A pairs
+
+2. **Format Check**
+ - Verify the CSV file format before importing
+ - Ensure there are no extra blank lines or spaces
+ - Verify that special characters are properly escaped
+
+3. **Batch Import**
+ - For large datasets, import in batches
+ - Verify data correctness after each batch
+
+## FAQ
+
+Q: Why did my file import fail?
+A: Check the following:
+- Is the file format CSV?
+- Is the encoding UTF-8?
+- Does the data strictly follow the template format?
+- Does the file exceed the size limit?
+
+Q: How do I verify a successful import?
+A: After a successful import, you can:
+- Search for imported questions in the knowledge base
+- Test answer accuracy through conversations
+- Check the knowledge base data statistics
diff --git a/document/content/docs/introduction/guide/knowledge_base/third_dataset.en.mdx b/document/content/docs/introduction/guide/knowledge_base/third_dataset.en.mdx
new file mode 100644
index 0000000000..5fc2f59409
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/third_dataset.en.mdx
@@ -0,0 +1,167 @@
+---
+title: Third-Party Knowledge Base Development
+description: How to integrate a third-party knowledge base with FastGPT
+---
+
+import { Alert } from '@/components/docs/Alert';
+
+There are many document libraries available online, such as Lark, Yuque, and others. Different FastGPT users may use different document libraries. FastGPT has built-in support for Lark and Yuque, but if you need to integrate other document libraries, follow this guide.
+
+
+## Unified API Specification
+
+To provide a unified interface for different document libraries, FastGPT defines a standard API specification with 4 endpoints. See the [API File Library endpoints](/docs/introduction/guide/knowledge_base/api_dataset).
+
+All built-in document libraries are extensions of the standard API File Library. Refer to the code in `FastGPT/packages/service/core/dataset/apiDataset/yuqueDataset/api.ts` to build extensions for other document libraries. You need to implement 4 endpoints:
+
+1. Get file list
+2. Get file content / file link
+3. Get original file preview URL
+4. Get file detail information
+
+## Building a Third-Party File Library
+
+For this walkthrough, we'll use adding a Lark Knowledge Dataset (FeishuKnowledgeDataset) as an example.
+
+### 1. Add Third-Party Document Library Parameters
+
+First, go to `FastGPT\packages\global\core\dataset\apiDataset.d.ts` in the FastGPT project and add the third-party document library server type. Design the fields based on your needs. For example, the Yuque knowledge base requires `userId` and `token` for authentication.
+
+```ts
+export type YuqueServer = {
+ userId: string;
+ token?: string;
+ basePath?: string;
+};
+```
+
+
+
+If the document library supports a `root directory` selection feature, add a `basePath` field. [See the root directory feature](/docs/introduction/guide/knowledge_base/third_dataset/#adding-the-configuration-form)
+
+
+
+
+
+### 2. Create the Hook File
+
+Each third-party document library uses a Hook pattern to maintain a set of API endpoints. The Hook contains 5 functions to implement.
+
+- Create a folder for your document library under `FastGPT\packages\service\core\dataset\apiDataset\`, then create an `api.ts` file inside it
+- In `api.ts`, define the following 5 functions:
+ - `listFiles`: Get the file list
+ - `getFileContent`: Get file content / file link
+ - `getFileDetail`: Get file detail information
+ - `getFilePreviewUrl`: Get the original file preview URL
+ - `getFileId`: Get the original file's real ID
+
+### 3. Add the Knowledge Base Type
+
+In `FastGPT\packages\global\core\dataset\type.d.ts`, import your new knowledge base type.
+
+
+
+### 4. Add Knowledge Base Data Retrieval
+
+In `FastGPT\packages\global\core\dataset\apiDataset\utils.ts`, add the following content.
+
+
+
+### 5. Add Knowledge Base Invocation Method
+
+In `FastGPT\packages\service\core\dataset\apiDataset\index.ts`, add the following content.
+
+
+
+## Adding the Frontend
+
+Add your i18n translations in `FastGPT\packages\web\i18n\zh-CN\dataset.json`, `FastGPT\packages\web\i18n\en\dataset.json`, and `FastGPT\packages\web\i18n\zh-Hant\dataset.json`. Using Chinese translations as an example, you'll generally need the following:
+
+
+
+In `FastGPT\packages\service\support\user/audit\util.ts`, add the following to support i18n translation retrieval.
+
+
+
+
+
+The i18n translation content is stored in `FastGPT\packages\web\i18n\zh-Hant\account_team.json`, `FastGPT\packages\web\i18n\zh-CN\account_team.json`, and `FastGPT\packages\web\i18n\en\account_team.json`. The field format is `dataset.XXX_dataset`. For example, for the Lark knowledge base, the field value is `dataset.feishu_knowledge_dataset`.
+
+
+
+Add your knowledge base icons under `FastGPT\packages\web\components\common\Icon\icons\core\dataset\`. You need two icons: `Outline` (monochrome) and `Color` (colored), as shown below.
+
+
+
+
+In `FastGPT\packages\web\components\common\Icon\constants.ts`, register your icons. The `import` path points to where the icons are stored.
+
+
+
+In `FastGPT\packages\global\core\dataset\constants.ts`, add your knowledge base type to both `DatasetTypeEnum` and `ApiDatasetTypeMap`.
+
+| | |
+| --- | --- |
+|  |  |
+
+
+
+The `courseUrl` field links to the relevant documentation — add it if available.
+Documentation goes in `FastGPT/document/content/docs/introduction/guide/dashboard/workflow/knowledge_base_search_merge.mdx`.
+The `label` value is the knowledge base name you added via i18n translations.
+`icon` and `avatar` are the two icons you added earlier.
+
+
+
+In `FastGPT\projects\app\src\pages\dataset\list\index.tsx`, add the following. This file handles the menu that appears when clicking the "New" button on the knowledge base list page. Your knowledge base must be added here to be creatable.
+
+
+
+In `FastGPT\projects\app\src\pageComponents\dataset\detail\Info\index.tsx`, add the following. This configuration corresponds to the UI shown below.
+
+| | |
+| --- | --- |
+|
+
+## Adding the Configuration Form
+
+In `FastGPT\projects\app\src\pageComponents\dataset\ApiDatasetForm.tsx`, add the following. This file handles the field input form when creating a knowledge base.
+
+| | | |
+| --- | --- | --- |
+|  |  |  |
+
+The two components added in the code render the root directory selector, corresponding to the `getFileDetail` API method. If your knowledge base doesn't support this, you can omit them.
+
+```
+{renderBaseUrlSelector()} // Renders the `Base URL` field
+{renderDirectoryModal()} // The `Select Root Directory` modal that appears when clicking `Select` (see image)
+```
+
+| | |
+| --- | --- |
+|  |  |
+
+If the knowledge base needs root directory support, also add the following in the `ApiDatasetForm` file.
+
+### 1. Parse the Knowledge Base Type
+
+Parse your knowledge base type from `apiDatasetServer`, as shown:
+
+
+
+### 2. Add Root Directory Selection Logic and `parentId` Assignment
+
+Add root directory selection logic to ensure the user has filled in all required fields for the API methods, such as the Token.
+
+
+
+### 3. Add Field Validation and Assignment Logic
+
+Verify that all required fields are present before calling the API, and assign the root directory value to the corresponding field after selection.
+
+
+
+## Tips
+
+After creating the knowledge base, we recommend running a full test of all knowledge base features to check for issues. If you encounter problems that aren't covered in this documentation, it's likely that some configuration was missed. Do a global search for `YuqueServer` and `yuqueServer` to verify that your type has been added everywhere it's needed.
diff --git a/document/content/docs/introduction/guide/knowledge_base/websync.en.mdx b/document/content/docs/introduction/guide/knowledge_base/websync.en.mdx
new file mode 100644
index 0000000000..4fff674e79
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/websync.en.mdx
@@ -0,0 +1,77 @@
+---
+title: Web Site Sync
+description: Introduction and usage of the FastGPT Web Site Sync feature
+---
+
+
+
+This feature is currently only available to commercial edition users.
+
+## What is Web Site Sync
+
+Web Site Sync uses crawler technology to automatically discover all pages under the `same domain` from an entry URL, supporting up to `200` sub-pages. For compliance and security reasons, FastGPT only supports crawling `static sites`, primarily intended for quickly building knowledge bases from documentation sites.
+
+Tip: Most China-based media sites are not supported, including WeChat Official Accounts, CSDN, Zhihu, etc. You can verify whether a site is static by sending a `curl` request from the terminal:
+
+```bash
+curl https://doc.fastgpt.io/docs/intro/
+```
+
+## How to Use
+
+### 1. Create a New Knowledge Base and Select Web Site Sync
+
+
+
+
+
+### 2. Click to Configure Site Information
+
+
+
+### 3. Enter the URL and Selector
+
+
+
+
+
+Click Start Sync and wait for the system to automatically crawl the site content.
+
+## Create an App and Bind the Knowledge Base
+
+
+
+## How to Use Selectors
+
+Selectors are based on HTML/CSS/JS. You can use selectors to target specific content to crawl rather than the entire site. Here's how:
+
+### Open the Browser DevTools (usually F12, or Right-click > Inspect)
+
+
+
+
+
+### Enter the Element Selector
+
+For a CSS selectors reference, see the [MDN CSS Selectors guide](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors).
+
+In the image above, we selected an area corresponding to a `div` tag with three attributes: `data-prismjs-copy`, `data-prismjs-copy-success`, and `data-prismjs-copy-error`. We only need one, so the selector is:
+**`div[data-prismjs-copy]`**
+
+Besides attribute selectors, class and ID selectors are also common. For example:
+
+
+
+The `class` in the image contains class names (there may be multiple separated by spaces — just pick one). The selector would be: **`.docs-content`**
+
+### Using Multiple Selectors
+
+In the earlier demo, we used multiple selectors for the FastGPT documentation site, separated by commas.
+
+
+
+We want to select content from the two tags shown above, which requires two selectors. The first is: `.docs-content .mb-0.d-flex`, meaning child elements under the `docs-content` class that have both the `mb-0` and `d-flex` classes.
+
+The second is `.docs-content div[data-prismjs-copy]`, meaning `div` elements under the `docs-content` class that have the `data-prismjs-copy` attribute.
+
+Separate the two selectors with a comma: `.docs-content .mb-0.d-flex, .docs-content div[data-prismjs-copy]`
diff --git a/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.en.mdx b/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.en.mdx
new file mode 100644
index 0000000000..8731b241d6
--- /dev/null
+++ b/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.en.mdx
@@ -0,0 +1,46 @@
+---
+title: Yuque File Library
+description: Introduction and usage of the FastGPT Yuque File Library
+---
+
+| | |
+| --- | --- |
+|  |  |
+
+Starting from FastGPT v4.8.16, commercial edition users can import from Yuque file libraries by configuring a Yuque token and uid. This feature is currently in beta — some interactions may still need refinement.
+
+## 1. Get the Yuque Token and UID
+
+Go to the Yuque homepage > click your avatar > Settings to find the relevant parameters.
+
+
+
+Follow the images below to get the Token and User ID. Make sure to assign the appropriate permissions to the Token:
+
+**Personal Edition**:
+
+| Get Token | Add Permissions | Get User ID |
+| --- | --- | --- |
+|  |  |  |
+
+**Enterprise Edition**:
+
+| Get Token | Get User ID |
+| --- | --- |
+|  |  |
+
+## 2. Create the Knowledge Base
+
+Using the token and uid from the previous step, create a knowledge base. Select the Yuque file library type, fill in the parameters, and click Create.
+
+
+
+
+
+## 3. Import Documents
+
+After creating the knowledge base, click `Add File` to import from your Yuque document library and follow the on-screen guidance.
+
+The Yuque knowledge base supports scheduled sync — it scans once daily at varying times. If documents have been updated, they will be synced automatically. You can also trigger a manual sync.
+
+
diff --git a/document/content/docs/introduction/guide/meta.en.json b/document/content/docs/introduction/guide/meta.en.json
new file mode 100644
index 0000000000..f466c10e22
--- /dev/null
+++ b/document/content/docs/introduction/guide/meta.en.json
@@ -0,0 +1,13 @@
+{
+ "title": "Features",
+ "description": "FastGPT features",
+ "pages": [
+ "course",
+ "dashboard",
+ "plugins",
+ "knowledge_base",
+ "team_permissions",
+ "DialogBoxes",
+ "admin"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/plugins/bing_search_plugin.en.mdx b/document/content/docs/introduction/guide/plugins/bing_search_plugin.en.mdx
new file mode 100644
index 0000000000..e01de90093
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/bing_search_plugin.en.mdx
@@ -0,0 +1,28 @@
+---
+title: Bing Search Plugin Configuration Guide
+description: Step-by-step guide for configuring the FastGPT Bing Search plugin
+---
+
+1. # Open the Microsoft Azure Portal and Log In
+
+https://portal.azure.com/
+
+
+
+2. # Create a Bing Web Search Resource
+
+Search for Bing Search v7 and click Create.
+
+https://portal.azure.com/#create/Microsoft.BingSearch
+
+
+
+3. # Go to the Resource Details and Click Manage Keys
+
+
+
+# 4. Copy Either Key and Paste It into the Plugin Input
+
+
+
+
diff --git a/document/content/docs/introduction/guide/plugins/dev_system_tool.en.mdx b/document/content/docs/introduction/guide/plugins/dev_system_tool.en.mdx
new file mode 100644
index 0000000000..d374644efd
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/dev_system_tool.en.mdx
@@ -0,0 +1,353 @@
+---
+title: How to Develop System Plugins
+description: FastGPT system plugin development guide (Tools)
+---
+
+## Introduction
+
+Starting from version 4.10.0, the FastGPT system plugin project moved to the standalone `fastgpt-plugin` repository, using a pure code approach for tool development.
+After the plugin marketplace update in version 4.14.0, the system tool development process changed — please follow the latest documentation when contributing code.
+
+You can develop and debug plugins independently in the `fastgpt-plugin` project, then submit a PR directly to FastGPT without needing to run the main FastGPT service.
+
+Currently, system plugins only support the "Tool" type.
+
+## Concepts
+
+- Tool: The smallest execution unit. Each tool has a unique ID with specific inputs and outputs.
+- Toolset: A collection of tools that can contain multiple tools.
+
+In `fastgpt-plugin`, you can create one tool or toolset at a time. Each submission accepts only one tool/toolset. To develop multiple, create separate PRs.
+
+## 1. Prepare the Development Environment
+
+### 1.1 Install Bun
+
+- Install [Bun](https://bun.sh/). FastGPT-plugin uses Bun as its package manager.
+
+### 1.2 Fork the FastGPT-plugin Repository
+
+Fork the repository at `https://github.com/labring/fastgpt-plugin`
+
+### 1.3 Set Up the Development Scaffold
+
+
+
+Note: Due to Bun-specific APIs, you must use bunx for installation. Using npx or pnpm will cause errors.
+
+Create a new directory and run:
+```bash
+bunx @fastgpt-sdk/plugin-cli
+```
+
+This creates a fastgpt-plugin directory and adds two remotes:
+- upstream pointing to the official repository
+- origin pointing to your fork
+
+Uses sparse-checkout by default to avoid pulling all official plugin code.
+
+
+
+- Initialize a `git` repository in a new local directory:
+
+```bash
+git init
+```
+
+If you have a Git SSH key configured:
+```bash
+git remote add origin git@github.com:[your-name]/fastgpt-plugin.git
+git remote add upstream git@github.com:labring/fastgpt-plugin.git
+```
+
+Otherwise use HTTPS:
+```bash
+git remote add origin https://github.com/[your-name]/fastgpt-plugin.git
+git remote add upstream https://github.com/labring/fastgpt-plugin.git
+```
+
+- (Optional) Use sparse-checkout to avoid pulling all plugin code. Without this, all official plugins will be pulled:
+```bash
+git sparse-checkout init --no-cone
+git sparse-checkout add "/*" "!/modules/tool/packages/*"
+git pull
+```
+
+Create a new tool:
+```bash
+bun i
+bun run new:tool
+```
+
+
+
+
+## 2. Write Tool Code
+
+### 2.1 Tool Code Structure
+
+Follow the prompts to choose between creating a tool or toolset, and enter a directory name (use camelCase).
+
+System tool file structure:
+
+```plaintext
+src // Source code and processing logic
+└── index.ts
+test // Test cases
+└── index.test.ts
+config.ts // Configuration: tool name, description, type, icon, etc.
+index.ts // Entry point — do not modify this file
+logo.svg // Logo — replace with your tool's logo
+README.md // (Optional) README with usage instructions and examples
+assets/ // (Optional) Resource files such as images, audio, etc.
+package.json // npm package
+```
+
+Toolset file structure:
+
+```plaintext
+children
+└── tool // Same structure as a tool above, but without README and assets
+config.ts
+index.ts
+logo.svg
+README.md
+assets/
+package.json
+```
+
+### 2.2 Modify config.ts
+
+- **name** and **description** fields support both Chinese and English
+- **courseUrl** (optional) — Link for obtaining keys, official website, tutorial, etc. If you provide a README.md, you can include it there instead
+- **author** — Developer name
+- **tags** — Default tags for the tool. Available tags (enum):
+ - tools: Tools
+ - search: Search
+ - multimodal: Multimodal
+ - communication: Communication
+ - finance: Finance
+ - design: Design
+ - productivity: Productivity
+ - news: News
+ - entertainment: Entertainment
+ - social: Social
+ - scientific: Scientific
+ - other: Other
+- **secretInputList** — Secret input list for configuring tool `activation information`, typically including `keys`, `Endpoint`, `Port`, etc. (see secretInputList format below)
+- **versionList** (configured per tool) — For version management. Each element has:
+ - value: Version number (semver recommended)
+ - description: Description
+ - inputs: Input parameters (see inputs format below)
+ - outputs: Return values (see outputs format below)
+
+For tools within a Toolset, `type`, `courseUrl`, and `author` are inherited from the Toolset configuration and don't need to be specified.
+
+#### secretInputList Format
+
+General format:
+```ts
+{
+ key: 'key', // Unique key
+ label: 'Frontend display label',
+ description: 'Frontend display description', // Optional
+ inputType: 'input' | 'secret' | 'switch' | 'select' | 'numberInput', // Frontend input type
+ // secret: Encrypted input — the value is symmetrically encrypted when saved
+ // switch: Toggle switch
+ // select: Dropdown select
+ // numberInput: Number input
+ // input: Plain text input
+}
+```
+
+Here's an example from the dalle3 configuration. See [dalle3's config.ts](https://github.com/labring/fastgpt-plugin/blob/main/modules/tool/packages/dalle3/config.ts) for the full file.
+
+```ts
+{
+ // Other configuration
+ secretInputConfig: [
+ {
+ key: 'url',
+ label: 'Dalle3 API Base URL',
+ description: 'e.g., https://api.openai.com',
+ inputType: 'input',
+ required: true
+ },
+ {
+ key: 'authorization',
+ label: 'API Credential (without Bearer prefix)',
+ description: 'sk-xxxx',
+ required: true,
+ inputType: 'secret'
+ }
+ ]
+}
+```
+
+#### inputs Format
+
+General format:
+
+```ts
+{
+ key: 'Unique key within this tool, matching the InputType definition in src/index.ts',
+ label: 'Frontend display label',
+ renderTypeList: [FlowNodeInputTypeEnum.input, FlowNodeInputTypeEnum.reference], // Frontend input type
+ valueType: WorkflowIOValueTypeEnum.string, // Data type
+ toolDescription: 'Description used during tool invocation' // Required if this is a tool call parameter
+}
+```
+
+dalle3 inputs example:
+```ts
+{
+//...
+ versionList: [
+ {
+ // Other configuration
+ inputs: [
+ {
+ key: 'prompt',
+ label: 'Drawing Prompt',
+ valueType: WorkflowIOValueTypeEnum.string,
+ renderTypeList: [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.input],
+ toolDescription: 'Drawing prompt'
+ }
+ ],
+ }
+ // ...
+ ]
+}
+```
+
+#### outputs Format
+```ts
+{
+ key: 'link', // Unique key
+ valueType: WorkflowIOValueTypeEnum.string, // See the Enum type definition for options
+ label: 'Image Access Link', // Display name
+ description: 'Image access link' // Description (optional)
+}
+```
+
+dalle3 outputs example:
+
+```ts
+{
+ // ...
+ versionList: [
+ {
+ // ...
+ outputs: [
+ {
+ valueType: WorkflowIOValueTypeEnum.string,
+ key: 'link',
+ label: 'Image Access Link',
+ description: 'Image access link'
+ },
+ {
+ type: FlowNodeOutputTypeEnum.error,
+ valueType: WorkflowIOValueTypeEnum.string,
+ key: 'system_error',
+ label: 'Error Message'
+ }
+ ]
+ }
+ ],
+}
+```
+
+### 2.3 Write the Processing Logic
+
+Write your processing logic in `[your-tool-name]/src/index.ts` as the entry point. Key requirements:
+
+1. Use zod for type definitions, exported as `InputType` and `OutputType` schemas.
+2. The entry function must be named `tool`. You can define additional helper functions.
+
+```ts
+import { format } from 'date-fns';
+import { z } from 'zod';
+
+export const InputType = z.object({
+ formatStr: z.string().optional()
+});
+
+export const OutputType = z.object({
+ time: z.string()
+});
+
+export async function tool(props: z.infer): Promise> {
+ const formatStr = props.formatStr || 'yyyy-MM-dd HH:mm:ss';
+
+ return {
+ time: format(new Date(), formatStr)
+ };
+}
+```
+
+The example above takes a `formatStr` (format string) and returns the current time. To install packages, run `bun install PACKAGE` from the `/modules/tools/packages/[your-tool-name]` directory.
+
+## 4. Build / Package
+
+Starting from FastGPT v4.14.0, system plugins are packaged as `.pkg` files. Run:
+```bash
+bun run build:pkg
+```
+This builds and packages all local plugins as `.pkg` files in the `dist/pkgs` directory.
+
+## 5. Unit Testing
+
+FastGPT-plugin uses Vitest as its testing framework.
+
+### 5.1 Write Test Cases
+
+Write test cases in `test/index.test.ts`. Run them with `bun run test index.test.ts `.
+
+> Note: Never include secret keys in test cases.
+>
+> When using AI agent tools to write test cases, the agent may modify your processing logic or even the testing framework itself.
+
+### 5.2 View Test Coverage
+
+Open `coverage/index.html` in a browser to view coverage for each plugin module.
+
+To submit plugins to the official repository, you must write unit tests that achieve:
+- 90%+ code coverage
+- 100% function coverage
+- 100% branch condition coverage
+
+## 6. E2E (End-to-End) Testing
+
+Simple tools may not need E2E testing. For complex tools, the review team may require it.
+
+### 6.1 Deploy the E2E Test Environment
+
+1. Follow [Quick Start Local Development](/docs/introduction/development/intro) to set up a local FastGPT development environment
+2. Run `cd runtime && cp .env.template .env.local` to copy the environment variable template, then connect to the Minio, Mongo, and Redis instances from step 1
+3. Run `bun run dev` to start the development environment, then update FastGPT's environment variables to connect to your fastgpt-plugin instance
+
+### 6.2 Test via Scalar
+
+Start the fastgpt-plugin development environment.
+
+Open `http://localhost:PORT/openapi` in a browser to access the `fastgpt-plugin` OpenAPI page for API debugging. Replace PORT with your fastgpt-plugin port number.
+
+
+
+First, use the `/tool/list` endpoint to get the tool list and find the `toolId` of the tool you want to debug. Then use `/tool/runStream` to run the tool and get results.
+
+
+
+### 6.3 E2E Testing in Dev Mode (with Hot Reload)
+
+By default, fastgpt-plugin automatically loads all tools under `modules/tool/packages/` and watches for file changes with hot reload. You can use these tools directly in FastGPT.
+
+### 6.4 Upload Tools for E2E Testing in Dev Mode (without Hot Reload)
+
+Set the FastGPT-plugin environment variable `DISABLE_DEV_TOOLS=true` to disable automatic loading of development tools, allowing you to test tool uploads instead.
+
+## 7. Submit Your Tool to the Official Repository
+
+After completing all the steps above, submit a PR to the official repository at `https://github.com/labring/fastgpt-plugin`. Once reviewed and approved, your tool will be included as an official FastGPT plugin.
+
+If you don't need official inclusion, refer to [Upload System Tool](upload_system_tool) to use it in your own FastGPT deployment.
diff --git a/document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.en.mdx b/document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.en.mdx
new file mode 100644
index 0000000000..e71f72c566
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.en.mdx
@@ -0,0 +1,22 @@
+---
+title: Doc2x Plugin Configuration Guide
+description: How to configure and use the Doc2x plugin
+---
+
+1. # Open the Doc2x Website, Create an Account, and Copy the API Key
+
+https://doc2x.noedgeai.com/
+
+
+
+
+
+2. # Enter the API Key in FastGPT
+
+**In Workflow mode:**
+
+
+
+**In Simple mode:**
+
+
diff --git a/document/content/docs/introduction/guide/plugins/google_search_plugin_guide.en.mdx b/document/content/docs/introduction/guide/plugins/google_search_plugin_guide.en.mdx
new file mode 100644
index 0000000000..03ba744ef7
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/google_search_plugin_guide.en.mdx
@@ -0,0 +1,28 @@
+---
+title: Google Search Plugin Configuration Guide
+description: FastGPT Google Search Plugin Configuration Guide
+---
+
+## 1. Create a Google Custom Search Engine
+
+https://programmablesearchengine.google.com/
+
+Go to the Custom Search Engine control panel and create a new Search Engine.
+
+
+
+Get the Search Engine ID (cx).
+
+
+
+## 2. Get an API Key
+
+https://developers.google.com/custom-search/v1/overview
+
+
+
+## 3. Fill in the Plugin Input Parameters
+
+Enter the Search Engine ID in the cx field and the API key in the key field.
+
+
diff --git a/document/content/docs/introduction/guide/plugins/meta.en.json b/document/content/docs/introduction/guide/plugins/meta.en.json
new file mode 100644
index 0000000000..72071b27dc
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/meta.en.json
@@ -0,0 +1,14 @@
+{
+ "title": "System Plugins",
+ "description": "Introduction to using and submitting system plugins, and filling instructions for each plugin",
+ "pages": [
+ "dev_system_tool",
+ "how_to_submit_system_plugin",
+ "upload_system_tool",
+ "searxng_plugin_guide",
+ "google_search_plugin_guide",
+ "bing_search_plugin",
+ "doc2x_plugin_guide",
+ "deepseek_plugin_guide"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/plugins/searxng_plugin_guide.en.mdx b/document/content/docs/introduction/guide/plugins/searxng_plugin_guide.en.mdx
new file mode 100644
index 0000000000..8dc191fc87
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/searxng_plugin_guide.en.mdx
@@ -0,0 +1,186 @@
+---
+title: SearXNG Search Plugin Configuration Guide
+description: FastGPT SearXNG Search Plugin Configuration Guide
+---
+
+[SearXNG](https://github.com/searxng/searxng) is a free internet metasearch engine that aggregates results from various search services and databases. It does not track or profile users. You can self-host it for your own use. This guide covers deploying SearXNG and integrating it with FastGPT.
+
+## 1. Deploy the Application
+
+This section covers deploying SearXNG on Sealos. For Docker deployment, refer to the [official SearXNG documentation](https://github.com/searxng/searxng).
+
+Open [Sealos Beijing Region](https://bja.sealos.run?uid=fnWRt09fZP), click App Launchpad, and create a new app:
+
+| Open App Launchpad | Create New App |
+| --- | --- |
+|  |  |
+
+## 2. Deployment Configuration
+
+Fill in the following parameters:
+
+* Image: searxng/searxng:latest
+* CPU: 0.2
+* Memory: 512M
+* Container Port: 8080
+* Enable public access
+* Click Advanced Configuration to add environment variables and config files
+
+
+
+**Environment Variables**
+
+Add these two variables to reduce concurrency and memory usage:
+
+```
+UWSGI_WORKERS=4
+UWSGI_THREADS=4
+```
+
+**Configuration File**
+
+Add a new config file with filename: `/etc/searx/settings.yml`
+
+File content:
+
+```txt
+general:
+ debug: false
+ instance_name: "searxng"
+ privacypolicy_url: false
+ donation_url: false
+ contact_url: false
+ enable_metrics: true
+ open_metrics: ''
+
+brand:
+ new_issue_url: https://github.com/searxng/searxng/issues/new
+ docs_url: https://docs.searxng.org/
+ public_instances: https://searx.space
+ wiki_url: https://github.com/searxng/searxng/wiki
+ issue_url: https://github.com/searxng/searxng/issues
+
+search:
+ safe_search: 0
+ autocomplete: ""
+ autocomplete_min: 4
+ default_lang: "auto"
+ ban_time_on_fail: 5
+ max_ban_time_on_fail: 120
+ formats:
+ - html
+
+server:
+ port: 8080
+ bind_address: "0.0.0.0"
+ base_url: false
+ limiter: false
+ public_instance: false
+ secret_key: "example"
+ image_proxy: false
+ http_protocol_version: "1.0"
+ method: "POST"
+ default_http_headers:
+ X-Content-Type-Options: nosniff
+ X-Download-Options: noopen
+ X-Robots-Tag: noindex, nofollow
+ Referrer-Policy: no-referrer
+
+redis:
+ url: false
+
+ui:
+ static_path: ""
+ static_use_hash: false
+ templates_path: ""
+ default_theme: simple
+ default_locale: ""
+ query_in_title: false
+ infinite_scroll: false
+ center_alignment: false
+ theme_args:
+ simple_style: auto
+
+outgoing:
+ request_timeout: 30.0
+ max_request_timeout: 40.0
+ pool_connections: 200
+ pool_maxsize: 50
+ enable_http2: false
+ retries: 5
+
+engines:
+
+ - name: bing
+ engine: bing
+ shortcut: bi
+
+doi_resolvers:
+ oadoi.org: 'https://oadoi.org/'
+ doi.org: 'https://doi.org/'
+ doai.io: 'https://dissem.in/'
+ sci-hub.se: 'https://sci-hub.se/'
+ sci-hub.st: 'https://sci-hub.st/'
+ sci-hub.ru: 'https://sci-hub.ru/'
+
+default_doi_resolver: 'oadoi.org'
+```
+
+Currently, only Bing works reliably in mainland China, so the config above only includes Bing. For overseas deployment, use [Sealos Singapore Region](https://cloud.sealos.io?uid=fnWRt09fZP) and add other search engines. Refer to the [SearXNG default config](https://github.com/searxng/searxng/blob/master/searx/settings.yml) for engine configurations. For example:
+
+```
+ - name: duckduckgo
+ engine: duckduckgo
+ shortcut: ddg
+
+ - name: google
+ engine: google
+ shortcut: go
+```
+
+## 3. Using with FastGPT
+
+Copy the public URL from your Sealos deployment and paste it into the SearXNG plugin URL field in FastGPT.
+
+| Copy Public URL | Paste into URL |
+| --- | --- |
+|  |  |
+
+## Response Format
+
+* Success returns an array of search results:
+
+```bash
+{
+ "result": "[{\"title\":\"Title1\",\"link\":\"Link1\",\"snippet\":\"Snippet1\"}, ...]"
+}
+```
+
+* Empty results return a friendly message:
+
+```bash
+{
+ "result": "[]",
+ "error": {
+ "message": "No search results",
+ "code": 500
+ }
+}
+```
+
+* Failures may return these error messages via Promise.reject:
+
+```bash
+- "Missing query parameter"
+- "Missing url"
+- "Failed to fetch data from Search XNG"
+```
+
+Issues typically stem from missing parameters or deployment problems. For more help, ask in the user community.
+
+## FAQ
+
+### No Search Results
+
+1. First, open the public URL directly and test if search works.
+2. Check for timed-out search engines -- API calls won't return results if engines time out.
diff --git a/document/content/docs/introduction/guide/plugins/upload_system_tool.en.mdx b/document/content/docs/introduction/guide/plugins/upload_system_tool.en.mdx
new file mode 100644
index 0000000000..66f517e9ce
--- /dev/null
+++ b/document/content/docs/introduction/guide/plugins/upload_system_tool.en.mdx
@@ -0,0 +1,59 @@
+---
+title: Upload System Tools Online
+description: FastGPT System Tool Online Upload Guide
+---
+
+> Starting from FastGPT 4.14.0, system admins can upload and update system tools directly through the web interface for hot reloading.
+
+## Permission Requirements
+
+⚠️ **Important**: Only **root users** can use the online system tool upload feature.
+
+- Make sure you are logged in with the `root` account
+
+## Supported File Formats
+
+- **File type**: `.pkg` files
+- **File size**: Maximum 100 MB
+- **File count**: Up to 15 files per upload
+
+## Upload Steps
+
+### 1. Access the Configuration Page
+
+
+
+
+### 2. Prepare Tool Files
+
+Before uploading, make sure your `.pkg` files are from the `dist/pkgs` folder, built by running `bun run build:pkg` in the fastgpt-plugin project.
+
+
+
+### 3. Upload
+
+1. Click the **"Import/Update"** button
+2. In the dialog that appears, click the file selection area
+3. Select your prepared `.pkg` tool files
+4. After confirming the file details, click **"Confirm Import"**
+
+### 4. Upload Process
+
+- A success message will appear after the upload completes
+- The page auto-refreshes and the new tools will appear in the tool list
+
+## Features
+
+### Tool Management
+
+- **View tools**: All users can view installed system tools
+- **Upload tools**: Only root users can upload new tools or update existing ones
+- **Delete tools**: Only root users can delete uploaded tools
+
+## FAQ
+
+### Q: Can't see the "Import/Update" button
+
+**Reason:** The current user is not a root user
+
+**Solution:** Log in again with the root account
diff --git a/document/content/docs/introduction/guide/team_permissions/customDomain.en.mdx b/document/content/docs/introduction/guide/team_permissions/customDomain.en.mdx
new file mode 100644
index 0000000000..2f535b0520
--- /dev/null
+++ b/document/content/docs/introduction/guide/team_permissions/customDomain.en.mdx
@@ -0,0 +1,42 @@
+---
+title: Configure Custom Domain
+description: How to configure a custom domain in FastGPT
+---
+
+FastGPT Cloud supports custom domain configuration starting from v4.14.4.
+
+## How to Configure a Custom Domain
+
+### 1. Open the "Custom Domain" Page
+
+In the sidebar, go to "Account" -> "Custom Domain" to open the configuration page.
+
+If your plan does not support this feature, follow the on-screen instructions to upgrade.
+
+
+
+### 2. Add a Custom Domain
+
+1. Have your domain ready. Your domain must have an ICP filing. Currently supported filing providers are Alibaba Cloud, Tencent Cloud, and Volcano Engine.
+2. Click the "Edit" button to enter edit mode.
+3. Enter your domain, e.g. www.example.com
+4. In your domain provider's DNS management console, add the CNAME record shown on the screen.
+5. After adding the DNS record, click "Save". The system will automatically verify the DNS configuration -- this usually takes less than a minute. If verification takes too long, try again.
+6. Once the status shows "Active", click "Confirm" to finish.
+
+
+
+You can now access FastGPT services and call FastGPT APIs using your own domain.
+
+## DNS Resolution Failure
+
+The system checks DNS resolution daily. If the DNS record becomes invalid, the custom domain will be disabled. You can re-verify it by clicking "Edit" on the "Custom Domain" management page.
+
+
+
+To change your custom domain or switch providers, delete the existing configuration and set it up again.
+
+
+## Use Cases
+
+- [Integrate with WeCom Bot](/docs/use-cases/external-integration/wecom)
diff --git a/document/content/docs/introduction/guide/team_permissions/invitation_link.en.mdx b/document/content/docs/introduction/guide/team_permissions/invitation_link.en.mdx
new file mode 100644
index 0000000000..df7fa3cbfe
--- /dev/null
+++ b/document/content/docs/introduction/guide/team_permissions/invitation_link.en.mdx
@@ -0,0 +1,62 @@
+---
+title: Invitation Links
+description: How to use invitation links to invite team members
+---
+
+Starting from v4.9.1, team member invitations use the **invitation link** method, replacing the previous username-based approach.
+
+After upgrading, any pending invitations that haven't been accepted will be automatically cleared. Please use invitation links to re-invite members.
+
+## How to Use
+
+1. **On the team management page, admins can click the "Invite Members" button to open the invitation dialog**
+
+
+
+2. **In the invitation dialog, click "Create Invitation Link" to generate a new link**
+
+
+
+3. **Fill in the details**
+
+
+
+Link description: We recommend describing the intended use case or purpose. The description cannot be changed after creation.
+
+Expiration: 30 minutes, 7 days, or 1 year
+
+Usage limit: 1 person or unlimited
+
+4. **Click "Copy Link" and send it to the people you want to invite**
+
+
+
+5. **When a user visits the link, they will be redirected to the login page if not logged in or registered. After logging in, they will be taken to the team page to handle the invitation.**
+
+> Invitation links look like: fastgpt.cn/account/team?invitelinkid=xxxx
+
+
+
+Click "Accept" to join the team.
+
+Click "Ignore" to close the dialog. The user can still accept the invitation by visiting the link again later.
+
+## Link Expiration and Auto-Cleanup
+
+### Why Links Expire
+
+Links are manually disabled by an admin.
+
+The invitation link reaches its expiration date and is automatically disabled.
+
+A single-use link (1 person limit) has already been used.
+
+Expired links cannot be accessed or re-enabled.
+
+### Link Limits
+
+Each user can have up to 10 **active** invitation links at a time.
+
+### Auto-Cleanup
+
+Expired links are automatically deleted after 30 days.
diff --git a/document/content/docs/introduction/guide/team_permissions/meta.en.json b/document/content/docs/introduction/guide/team_permissions/meta.en.json
new file mode 100644
index 0000000000..47824595dd
--- /dev/null
+++ b/document/content/docs/introduction/guide/team_permissions/meta.en.json
@@ -0,0 +1,9 @@
+{
+ "title": "Team & Permissions",
+ "description": "Team management, member groups, and permission settings to ensure data security and proper permission allocation in team collaboration.",
+ "pages": [
+ "team_roles_permissions",
+ "invitation_link",
+ "customDomain"
+ ]
+}
diff --git a/document/content/docs/introduction/guide/team_permissions/team_roles_permissions.en.mdx b/document/content/docs/introduction/guide/team_permissions/team_roles_permissions.en.mdx
new file mode 100644
index 0000000000..9e4953f39f
--- /dev/null
+++ b/document/content/docs/introduction/guide/team_permissions/team_roles_permissions.en.mdx
@@ -0,0 +1,201 @@
+---
+title: Teams, Groups & Permissions
+description: How to manage FastGPT teams, member groups, and permission settings
+---
+
+# Teams, Groups & Permissions
+
+## Permission System Overview
+
+FastGPT's permission system combines **attribute-based** and **role-based** access control, providing fine-grained permission management for team collaboration. Through **members, departments, and groups**, you can flexibly configure access to teams, apps, and knowledge bases.
+
+## Teams
+
+Each user can belong to multiple teams. The system automatically creates an initial team for every user. Manual creation of additional teams is not currently supported.
+
+## Permission Management
+
+FastGPT offers three permission management levels:
+
+**Member Permissions**: Highest priority, directly assigned to individuals
+
+**Department & Group Permissions**: Use union logic, lower priority than member permissions
+
+Permission evaluation follows this logic:
+
+First, check the user's individual member permissions
+
+Then, check permissions from the user's departments and groups (union)
+
+Final permissions are the combination of the above
+
+Authorization logic:
+
+
+
+### Resource Permissions
+
+Different **resources** have different permissions.
+
+Resources refer to concepts like apps, knowledge bases, teams, etc.
+
+The table below shows the manageable permissions for different resources.
+
+
+
+
+
Resource
+
Manageable Permissions
+
Description
+
+
+
+
+
Team
+
Create Apps
+
Create, delete, and other basic operations
+
+
+
Create Knowledge Bases
+
Create, delete, and other basic operations
+
+
+
Create Team APIKey
+
Create, delete, and other basic operations
+
+
+
Manage Members
+
Invite/remove users, create groups, etc.
+
+
+
App
+
Can Use
+
Allows conversation interaction
+
+
+
Can Edit
+
Modify basic info, workflow orchestration, etc.
+
+
+
Can Manage
+
Add or remove collaborators
+
+
+
Knowledge Base
+
Can Use
+
Can call this knowledge base in apps
+
+
+
Can Edit
+
Modify knowledge base content
+
+
+
Can Manage
+
Add or remove collaborators
+
+
+
+
+### Collaborators
+
+You must add **collaborators** before managing their permissions:
+
+
+
+When managing team permissions, first select members/organizations/groups, then configure permissions.
+
+
+
+For resources like apps and knowledge bases, you can directly modify member permissions.
+
+
+
+Team permissions are set on a dedicated permissions page.
+
+
+
+## Special Permissions
+
+### Admin Permissions
+
+Admins primarily manage resource collaboration relationships, with these limitations:
+
+- Cannot modify or remove their own permissions
+- Cannot modify or remove other admins' permissions
+- Cannot grant admin permissions to other collaborators
+
+### Owner Permissions
+
+Each resource has a unique Owner with the highest permissions for that resource. Owners can transfer ownership, but will lose all permissions to the resource after transfer.
+
+### Root Permissions
+
+Root is the system's only super admin account, with complete access and management rights to all resources across all teams.
+
+## Tips
+
+### 1. Set Default Team Permissions
+
+Use the "All Members Group" to quickly set baseline permissions for the entire team. For example, grant everyone access to an app.
+
+**Note**: Individual member permissions override all-member group permissions. For example, if App A has all-member edit permissions, but User M is individually set to use-only, User M can only use the app, not edit it.
+
+### 2. Batch Permission Management
+
+Create groups or organizations to efficiently manage permissions for multiple users. Add users to a group, then grant permissions to the entire group.
+
+### Developer Reference
+> The following content is for developers. Skip if you're not doing custom development.
+
+#### Permission Design Principles
+
+FastGPT's permission system is inspired by Linux permissions, using binary storage for permission bits. A permission bit of 1 means the permission is granted, 0 means no permission. Owner permissions are specially marked as all 1s.
+
+#### Permission Table
+
+Permission information is stored in MongoDB's resource_permissions collection, with these main fields:
+
+- teamId: Team identifier
+- tmbId/groupId/orgId: Permission subject (one of three)
+- resourceType: Resource type (team/app/dataset)
+- permission: Permission value (number)
+- resourceId: Resource ID (null for team resources)
+
+The system implements flexible and precise permission control through this data structure.
+
+The schema for this table is defined in packages/service/support/permission/schema.ts:
+
+```typescript
+export const ResourcePermissionSchema = new Schema({
+ teamId: {
+ type: Schema.Types.ObjectId,
+ ref: TeamCollectionName
+ },
+ tmbId: {
+ type: Schema.Types.ObjectId,
+ ref: TeamMemberCollectionName
+ },
+ groupId: {
+ type: Schema.Types.ObjectId,
+ ref: MemberGroupCollectionName
+ },
+ orgId: {
+ type: Schema.Types.ObjectId,
+ ref: OrgCollectionName
+ },
+ resourceType: {
+ type: String,
+ enum: Object.values(PerResourceTypeEnum),
+ required: true
+ },
+ permission: {
+ type: Number,
+ required: true
+ },
+ // Resrouce ID: App or DataSet or any other resource type.
+ // It is null if the resourceType is team.
+ resourceId: {
+ type: Schema.Types.ObjectId
+ }
+});
+```
diff --git a/document/content/docs/introduction/index.en.mdx b/document/content/docs/introduction/index.en.mdx
index b105a6195d..0d75b00e08 100644
--- a/document/content/docs/introduction/index.en.mdx
+++ b/document/content/docs/introduction/index.en.mdx
@@ -1,11 +1,11 @@
---
-title: Quick Introduction to FastGPT
-description: FastGPT's Capabilities and Advantages
+title: Getting Started with FastGPT
+description: FastGPT capabilities and advantages
---
import { Alert } from '@/components/docs/Alert';
-FastGPT is a knowledge base Q&A system based on LLM (Large Language Models), perfectly combining intelligent dialogue with visual orchestration to make AI application development simple and natural. Whether you are a developer or a business user, you can easily create your own AI applications.
+FastGPT is a knowledge base Q&A system built on LLMs, combining intelligent conversation with visual orchestration to make AI application development simple and natural. Whether you're a developer or a business user, you can easily build your own AI applications.
Quick Start
@@ -17,37 +17,37 @@ Quick Start
| --------------------- | --------------------------------- |
|  |  |
-# FastGPT's Advantages
+# Why FastGPT
## 1. Simple and Flexible, Like Building Blocks 🧱
-As simple and fun as building with LEGO, FastGPT provides rich functional modules. You can build personalized AI applications through simple drag-and-drop, and implement complex business processes with zero code.
-## 2. Make Data Smarter 🧠
-FastGPT provides a complete data intelligence solution, from data import, preprocessing to knowledge matching, and then to intelligent Q&A, with full-process automation. Combined with visual workflow design, you can easily create professional-grade AI applications.
+Build AI applications as easily as snapping LEGO bricks together. FastGPT provides rich functional modules that let you create personalized AI apps through simple drag-and-drop — no coding required, even for complex business processes.
+## 2. Make Your Data Smarter 🧠
+FastGPT provides a complete data intelligence solution — from data import and preprocessing to knowledge matching and intelligent Q&A — fully automated. Combined with visual workflow design, you can easily build professional-grade AI applications.
## 3. Open Source and Easy to Integrate 🔗
-FastGPT is open source under the Apache 2.0 license and supports secondary development. It can be quickly integrated through standard APIs without modifying the source code. It supports mainstream models such as ChatGPT, Claude, DeepSeek, and Wenxin Yiyan, with continuous iteration and optimization to maintain product vitality.
+FastGPT is open source under the Apache 2.0 license and supports custom development. Integrate quickly through standard APIs without modifying source code. Supports mainstream models including ChatGPT, Claude, DeepSeek, and ERNIE Bot, with continuous iteration to keep the product evolving.
---
# What Can FastGPT Do
## 1. Comprehensive Knowledge Base
-You can easily import various documents and data, which will be automatically processed for knowledge structuring. It also features intelligent Q&A with multi-turn context understanding, providing users with a continuously optimized knowledge base management experience.
+Import documents and data with automatic knowledge structuring. Features intelligent Q&A with multi-turn context understanding and a continuously improving knowledge base management experience.

## 2. Visual Workflow
-FastGPT's intuitive drag-and-drop interface design allows you to build complex business processes with zero code. It has rich functional node components that can handle various business needs, with flexible process orchestration capabilities to customize business processes on demand.
+FastGPT's intuitive drag-and-drop interface lets you build complex business processes with zero code. Rich functional node components handle diverse business needs with flexible process orchestration.

## 3. Intelligent Data Parsing
-FastGPT's knowledge base system is extremely flexible in processing imported data. It can intelligently handle the complex structure of PDF documents, preserve images, tables, and LaTeX formulas, automatically recognize scanned files, and structure content into clear Markdown format. It also supports automatic image annotation and indexing, making visual content understandable and searchable, ensuring that knowledge is presented and applied completely and accurately in AI Q&A.
+FastGPT's knowledge base system handles imported data with great flexibility — intelligently processing complex PDF structures while preserving images, tables, and LaTeX formulas. It automatically recognizes scanned files and structures content into clean Markdown format. It also supports automatic image annotation and indexing, making visual content searchable and ensuring knowledge is presented accurately in AI Q&A.

## 4. Workflow Orchestration
-Based on Flow module workflow orchestration, you can design more complex Q&A processes. For example, querying databases, checking inventory, booking laboratories, etc.
+Flow-based workflow orchestration lets you design complex Q&A processes — such as querying databases, checking inventory, or booking lab resources.

## 5. Powerful API Integration
-FastGPT is fully aligned with OpenAI's official interface, supporting one-click integration with platforms such as Enterprise WeChat, Official Accounts, Feishu, and DingTalk, allowing AI capabilities to easily integrate into your business scenarios.
+FastGPT is fully compatible with the OpenAI API interface, supporting one-click integration with WeCom, WeChat Official Account, Lark, DingTalk, and more — bringing AI capabilities into your business workflows.

@@ -57,7 +57,7 @@ FastGPT is fully aligned with OpenAI's official interface, supporting one-click
- Out-of-the-box knowledge base system
- Visual low-code workflow orchestration
-- Support for mainstream large models
+- Support for mainstream LLMs
- Simple and easy-to-use API interface
- Flexible data processing capabilities
@@ -69,9 +69,9 @@ FastGPT is fully aligned with OpenAI's official interface, supporting one-click
---
-FastGPT is an open source project driven by users and contributors. If you have questions or suggestions about the product, you can seek support in the following ways. Our team and community will do our best to help you.
+FastGPT is an open source project driven by users and contributors. If you have questions or suggestions, try the following support channels. Our team and community will do our best to help.
-- 📱 Scan to join Feishu group 👇
+- 📱 Scan to join the Lark community group 👇
-- 🐞 Please submit any FastGPT bugs, issues, and requirements to [GitHub Issue](https://github.com/labring/fastgpt/issues/new/choose).
+- 🐞 Submit any FastGPT bugs, issues, or feature requests to [GitHub Issues](https://github.com/labring/fastgpt/issues/new/choose).
diff --git a/document/content/docs/introduction/meta.en.json b/document/content/docs/introduction/meta.en.json
new file mode 100644
index 0000000000..57d1e6c2fb
--- /dev/null
+++ b/document/content/docs/introduction/meta.en.json
@@ -0,0 +1,14 @@
+{
+ "title": "Documentation",
+ "root": true,
+ "pages": [
+ "---Getting Started---",
+ "index",
+ "cloud",
+ "commercial",
+ "development",
+ "---Features---",
+ "...guide"
+ ],
+ "order": 1
+}
diff --git a/document/content/docs/openapi/app.en.mdx b/document/content/docs/openapi/app.en.mdx
new file mode 100644
index 0000000000..99f6a51811
--- /dev/null
+++ b/document/content/docs/openapi/app.en.mdx
@@ -0,0 +1,195 @@
+---
+title: Application API
+description: FastGPT OpenAPI Application Interface
+---
+
+## Prerequisites
+
+1. Prepare your API Key: You can use the global API Key directly
+2. Get your application's AppId
+
+
+
+
+## Log API
+
+### Get Cumulative Run Results
+
+
+
+
+
+ ```bash
+ curl --location --request GET 'https://cloud.fastgpt.cn/api/proApi/core/app/logs/getTotalData?appId=68c46a70d950e8850ae564ba' \
+--header 'Authorization: Bearer apikey'
+ ```
+
+
+
+
+
+ ```bash
+ {
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": {
+ "totalUsers": 0,
+ "totalChats": 0,
+ "totalPoints": 0
+ }
+ }
+ ```
+
+
+
+
+
+
+ **Request Parameters:**
+ - appId: Application ID
+
+ **Response Parameters:**
+ - totalUsers: Total number of users
+ - totalChats: Total number of conversations
+ - totalPoints: Total points consumed
+
+
+
+
+
+
+### Get Application Log Dashboard
+
+
+
+
+
+ ```bash
+curl --location --request POST 'https://cloud.fastgpt.cn/api/proApi/core/app/logs/getChartData' \
+--header 'Authorization: Bearer apikey' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "appId": "68c46a70d950e8850ae564ba",
+ "dateStart": "2025-09-19T16:00:00.000Z",
+ "dateEnd": "2025-09-27T15:59:59.999Z",
+ "offset": 1,
+ "source": [
+ "test",
+ "online",
+ "share",
+ "api",
+ "cronJob",
+ "team",
+ "feishu",
+ "official_account",
+ "wecom",
+ "mcp"
+ ],
+ "userTimespan": "day",
+ "chatTimespan": "day",
+ "appTimespan": "day"
+}'
+ ```
+
+
+
+
+
+```bash
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": {
+ "userData": [
+ {
+ "timestamp": 1758585600000,
+ "summary": {
+ "userCount": 1,
+ "newUserCount": 0,
+ "retentionUserCount": 0,
+ "points": 1.1132600000000001,
+ "sourceCountMap": {
+ "test": 1,
+ "online": 0,
+ "share": 0,
+ "api": 0,
+ "cronJob": 0,
+ "team": 0,
+ "feishu": 0,
+ "official_account": 0,
+ "wecom": 0,
+ "mcp": 0
+ }
+ }
+ }
+ ],
+ "chatData": [
+ {
+ "timestamp": 1758585600000,
+ "summary": {
+ "chatItemCount": 1,
+ "chatCount": 1,
+ "errorCount": 0,
+ "points": 1.1132600000000001
+ }
+ }
+ ],
+ "appData": [
+ {
+ "timestamp": 1758585600000,
+ "summary": {
+ "goodFeedBackCount": 0,
+ "badFeedBackCount": 0,
+ "chatCount": 1,
+ "totalResponseTime": 22.31
+ }
+ }
+ ]
+ }
+}
+```
+
+
+
+
+
+**Request Parameters:**
+- appId: Application ID
+- dateStart: Start time
+- dateEnd: End time
+- source: Log source
+- offset: User retention offset
+- userTimespan: User data timespan //day|week|month|quarter
+- chatTimespan: Chat data timespan //day|week|month|quarter
+- appTimespan: Application data timespan //day|week|month|quarter
+
+**Response Parameters:**
+
+- userData: User data array
+ - timestamp: Timestamp
+ - summary: Summary data object
+ - userCount: Active user count
+ - newUserCount: New user count
+ - retentionUserCount: Retained user count
+ - points: Total points consumed
+ - sourceCountMap: User count by source
+- chatData: Chat data array
+ - timestamp: Timestamp
+ - summary: Summary data object
+ - chatItemCount: Chat message count
+ - chatCount: Session count
+ - errorCount: Error count
+ - points: Total points consumed
+- appData: Application data array
+ - timestamp: Timestamp
+ - summary: Summary data object
+ - goodFeedBackCount: Positive feedback count
+ - badFeedBackCount: Negative feedback count
+ - chatCount: Chat count
+ - totalResponseTime: Total response time
+
+
+
+
diff --git a/document/content/docs/openapi/chat.en.mdx b/document/content/docs/openapi/chat.en.mdx
new file mode 100644
index 0000000000..2bee7f6f79
--- /dev/null
+++ b/document/content/docs/openapi/chat.en.mdx
@@ -0,0 +1,1246 @@
+---
+title: Chat API
+description: FastGPT OpenAPI Chat Interface
+---
+
+# How to Get AppId
+
+You can find the AppId in your application details URL.
+
+
+
+# Start a Conversation
+
+- This API requires an application-specific API key, or it will return an error.
+- Some packages require adding `v1` to the `BaseUrl`. If you get a 404 error, try adding `v1` and retry.
+
+{/* * 对话现在有`v1`和`v2`两个接口,可以按需使用,v2 自 4.9.4 版本新增,v1 接口同时不再维护 */}
+
+## Request Chat Agent and Workflow
+
+The `v1` chat API is compatible with the `GPT` interface! If you're using the standard `GPT` official API, you can access FastGPT by simply changing the `BaseUrl` and `Authorization`. However, note these rules:
+
+* Parameters like `model` and `temperature` are ignored. These values are determined by your workflow configuration.
+* Won't return actual `Token` consumed. If needed, set `detail=true` and manually calculate `tokens` from `responseData`.
+
+### Request
+
+
+
+
+
+ ```bash
+ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
+ --header 'Authorization: Bearer fastgpt-xxxxxx' \
+ --header 'Content-Type: application/json' \
+ --data-raw '{
+ "chatId": "my_chatId",
+ "stream": false,
+ "detail": false,
+ "responseChatItemId": "my_responseChatItemId",
+ "variables": {
+ "uid": "asdfadsfasfd2323",
+ "name": "张三"
+ },
+ "messages": [
+ {
+ "role": "user",
+ "content": "导演是谁"
+ }
+ ]
+ }'
+ ```
+
+
+
+
+
+ - Only `messages` differs slightly; other parameters are the same.
+ - Direct file uploads are not supported. Upload files to your object storage and provide the URL.
+
+ ```bash
+ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
+ --header 'Authorization: Bearer fastgpt-xxxxxx' \
+ --header 'Content-Type: application/json' \
+ --data-raw '{
+ "chatId": "abcd",
+ "stream": false,
+ "messages": [
+ {
+ "role": "user",
+ "content": [
+ {
+ "type": "text",
+ "text": "导演是谁"
+ },
+ {
+ "type": "image_url",
+ "image_url": {
+ "url": "图片链接"
+ }
+ },
+ {
+ "type": "file_url",
+ "name": "文件名",
+ "url": "文档链接,支持 txt md html word pdf ppt csv excel"
+ }
+ ]
+ }
+ ]
+ }'
+ ```
+
+
+
+
+
+
+- appId - Application ID
+- offset - Offset (starting position)
+- pageSize - Number of records
+- source - Chat source. source=api means get API-created chats only (excludes web UI chats)
+
+- appId - Application ID
+- chatId - History ID
+- offset - Offset
+- pageSize - Number of records
+- loadCustomFeedbacks - Whether to load custom feedbacks (optional)
+
+- appId - Application ID
+- chatId - History ID
+- dataId - Chat Record ID
+- userGoodFeedback - User feedback when liking (optional). Omit to unlike.
+
+- appId - Application ID
+- chatId - History ID
+- dataId - Chat Record ID
+- userBadFeedback - User feedback when disliking (optional). Omit to remove dislike.
+
+
+- parentId - Parent ID for building directory structure. Usually can be null or omitted.
+- type - `dataset` or `folder`, represents regular dataset or folder. If not provided, creates a regular dataset.
+- name - Dataset name (required)
+- intro - Description (optional)
+- avatar - Avatar URL (optional)
+- vectorModel - Vector model (recommended to leave empty, use system default)
+- agentModel - Text processing model (recommended to leave empty, use system default)
+- vlmModel - Image understanding model (recommended to leave empty, use system default)
+
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": null
+}
+```
+
+
+
+
+## Collection
+
+### Common Creation Parameters (Must Read)
+
+**Request**
+
+| Parameter | Description | Required |
+| ---------------- | ----------------------------------------------------------------------------------------------------------- | ---- |
+| datasetId | Dataset ID | ✅ |
+| parentId: | Parent ID. Defaults to root directory if not provided | |
+| trainingType | Data processing method. chunk: split by text length; qa: Q&A extraction | ✅ |
+| indexPrefixTitle | Whether to auto-generate title index | |
+| customPdfParse | Whether to enable enhanced PDF parsing. Default false: disabled; true: enabled | |
+| autoIndexes | Whether to auto-generate indexes (commercial version only) | |
+| imageIndex | Whether to auto-generate image indexes (commercial version only) | |
+| chunkSettingMode | Chunk parameter mode. auto: system default; custom: manual specification | |
+| chunkSplitMode | Chunk split mode. size: split by length; char: split by character. Ineffective when chunkSettingMode=auto. | |
+| chunkSize | Chunk size, default 1500. Ineffective when chunkSettingMode=auto. | |
+| indexSize | Index size, default 512, must be less than index model max token. Ineffective when chunkSettingMode=auto. | |
+| chunkSplitter | Custom highest priority split symbol. Won't split further unless exceeding file processing max context. Ineffective when chunkSettingMode=auto. | |
+| qaPrompt | QA split prompt | |
+| tags | Collection tags (string array) | |
+| createTime | File creation time (Date / String) | |
+
+**Response**
+
+- collectionId - New collection ID
+- insertLen:Number of inserted chunks
+
+### Create an Empty Collection
+
+
+
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/create' \
+--header 'Authorization: Bearer {{authorization}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "datasetId":"6593e137231a2be9c5603ba7",
+ "parentId": null,
+ "name":"测试",
+ "type":"virtual",
+ "metadata":{
+ "test":111
+ }
+}'
+```
+
+
+
+
+
+- datasetId: Dataset ID(Required)
+- parentId: Parent ID. Defaults to root directory if not provided
+- name: Collection name (required)
+- type:
+ - folder:Folder
+ - virtual: Virtual collection (manual collection)
+- metadata: Metadata (not currently used)
+
+
+
+
+
+
+data is the collection ID.
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": "65abcd009d1448617cba5ee1"
+}
+```
+
+
+
+
+### Create a Text Collection
+
+Pass in text to create a collection. The text will be split accordingly.
+
+
+
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/create/text' \
+--header 'Authorization: Bearer {{authorization}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "text":"xxxxxxxx",
+ "datasetId":"6593e137231a2be9c5603ba7",
+ "parentId": null,
+ "name":"测试训练",
+
+ "trainingType": "qa",
+ "chunkSettingMode": "auto",
+ "qaPrompt":"",
+
+ "metadata":{}
+}'
+```
+
+
+
+
+
+- text: Original text
+- datasetId: Dataset ID(Required)
+- parentId: Parent ID. Defaults to root directory if not provided
+- name: Collection name (required)
+- metadata: Metadata (not currently used)
+
+
+
+
+
+
+data is the collection ID.
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": {
+ "collectionId": "65abcfab9d1448617cba5f0d",
+ "results": {
+ "insertLen": 5, // Split into how many segments
+ "overToken": [],
+ "repeat": [],
+ "error": []
+ }
+ }
+}
+```
+
+
+
+
+### Create a Link Collection
+
+Pass in a web link to create a collection. Content will be fetched from the webpage first, then split.
+
+
+
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/create/link' \
+--header 'Authorization: Bearer {{authorization}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "link":"https://doc.fastgpt.io/docs/course/quick-start/",
+ "datasetId":"6593e137231a2be9c5603ba7",
+ "parentId": null,
+
+ "trainingType": "chunk",
+ "chunkSettingMode": "auto",
+ "qaPrompt":"",
+
+ "metadata":{
+ "webPageSelector":".docs-content"
+ }
+}'
+```
+
+
+
+
+
+- link: Web link
+- datasetId: Dataset ID(Required)
+- parentId: Parent ID. Defaults to root directory if not provided
+- metadata.webPageSelector: Web page selector to specify which element to use as text (optional)
+
+
+
+
+
+
+data is the collection ID.
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": {
+ "collectionId": "65abd0ad9d1448617cba6031",
+ "results": {
+ "insertLen": 1,
+ "overToken": [],
+ "repeat": [],
+ "error": []
+ }
+ }
+}
+```
+
+
+
+
+### Create a File Collection
+
+Pass in a file to create a collection. File content will be read and split. Currently supports: pdf, docx, md, txt, html, csv.
+
+
+
+
+When uploading via code, note that Chinese filenames need to be encoded to avoid garbled text.
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/create/localFile' \
+--header 'Authorization: Bearer {{authorization}}' \
+--form 'file=@"C:\\Users\\user\\Desktop\\fastgpt测试File\\index.html"' \
+--form 'data="{\"datasetId\":\"6593e137231a2be9c5603ba7\",\"parentId\":null,\"trainingType\":\"chunk\",\"chunkSize\":512,\"chunkSplitter\":\"\",\"qaPrompt\":\"\",\"metadata\":{}}"'
+```
+
+
+
+
+
+Use POST form-data format for upload. Contains file and data fields.
+
+- file: File
+- data: Dataset-related info (pass as serialized JSON). See "Common Creation Parameters" above
+
+
+
+
+
+
+data is the collection ID.
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": {
+ "collectionId": "65abc044e4704bac793fbd81",
+ "results": {
+ "insertLen": 1,
+ "overToken": [],
+ "repeat": [],
+ "error": []
+ }
+ }
+}
+```
+
+
+
+
+### Create an API Collection
+
+Pass in a file ID to create a collection. File content will be read and split. Currently supports: pdf, docx, md, txt, html, csv.
+
+
+
+
+When uploading via code, note that Chinese filenames need to be encoded to avoid garbled text.
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/collection/create/apiCollection' \
+--header 'Authorization: Bearer fastgpt-xxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "name": "A Quick Guide to Building a Discord Bot.pdf",
+ "apiFileId":"A Quick Guide to Building a Discord Bot.pdf",
+
+ "datasetId": "674e9e479c3503c385495027",
+ "parentId": null,
+
+ "trainingType": "chunk",
+ "chunkSize":512,
+ "chunkSplitter":"",
+ "qaPrompt":""
+}'
+```
+
+
+
+
+
+Use POST form-data format for upload. Contains file and data fields.
+
+- name: Collection name, recommended to use filename, required.
+- apiFileId: File ID, required.
+- datasetId: Dataset ID(Required)
+- parentId: Parent ID. Defaults to root directory if not provided
+- trainingType:Training mode (required)
+- chunkSize: Length of each chunk (optional). chunk mode: 100~3000; qa mode: 4000~model max token (16k models usually recommended not to exceed 10000)
+- chunkSplitter: Custom highest priority split symbol (optional)
+- qaPrompt: QA split custom prompt (optional)
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": null
+}
+```
+
+
+
+
+## Data
+
+### Data Structure
+
+**Data Structure**
+
+| Field | Type | Description | Required |
+| ------------- | ------- | -------- | ---- |
+| teamId | String | Team ID | ✅ |
+| tmbId | String | Member ID | ✅ |
+| datasetId | String | Dataset ID | ✅ |
+| collectionId | String | CollectionID | ✅ |
+| q | String | Primary data | ✅ |
+| a | String | Auxiliary data | ✖ |
+| fullTextToken | String | Tokenization | ✖ |
+| indexes | Index[] | Vector indexes | ✅ |
+| updateTime | Date | Update time | ✅ |
+| chunkIndex | Number | Chunk index | ✖ |
+
+**Index Structure**
+
+Maximum 5 custom indexes per data group
+
+| Field | Type | Description | Required |
+| ------ | ------ | ------------------------------------------------------------------------------------------------------ | ---- |
+| type | String | Optional index types: default-default index; custom-custom index; summary-summary index; question-question index; image-image index | |
+| dataId | String | Associated vector ID. Pass this ID when updating data for incremental updates instead of full updates | |
+| text | String | Text content | ✅ |
+
+`type` If not provided, defaults to `custom` index. A default index will also be created based on q/a. If a default index is provided, no additional one will be created.
+
+### Batch Add Data to Collection
+
+Note: Maximum 200 data groups per push.
+
+
+
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/data/pushData' \
+--header 'Authorization: Bearer apikey' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "collectionId": "64663f451ba1676dbdef0499",
+ "trainingType": "chunk",
+ "prompt": "Optional. QA split guide prompt, ignored in chunk mode",
+ "billId": "可选。如果有这个值,本次的Data会被聚合到一个订单中,这个值可以重复使用。可以参考 [Create Training Order] 获取该值。",
+ "data": [
+ {
+ "q": "Who are you?",
+ "a": "I'm FastGPT Assistant"
+ },
+ {
+ "q": "What can you do?",
+ "a": "I can do anything",
+ "indexes": [
+ {
+ "text":"Custom index 1"
+ },
+ {
+ "text":"Custom index 2"
+ }
+ ]
+ }
+ ]
+}'
+```
+
+
+
+
+
+
+- collectionId: Collection ID (required)
+- trainingType:Training mode (required)
+- prompt: Custom QA split prompt. Must follow template strictly. Recommended not to pass. (optional)
+- data:(Specific data)
+
+ - q: Primary data(Required)
+ - a: Auxiliary data (optional)
+ - indexes: Custom indexes (optional). Can omit or pass empty array. By default, an index will be created from q and a.
+
+
+
+
+
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "data": {
+ "insertLen": 1, // Final number of successful insertions
+ "overToken": [], // Exceeding token
+ "repeat": [], // Number of duplicates
+ "error": [] // Other errors
+ }
+}
+```
+
+
+
+
+
+[theme] content can be replaced with the data theme. Default: They may contain multiple theme contents
+
+```
+I'll give you a text, [theme], learn it, and organize the learning results, requirements:
+1. Propose up to 25 questions.
+2. Provide answers to each question.
+3. Answers should be detailed and complete, and can include plain text, links, code, tables, formulas, media links, and other markdown elements.
+4. Return multiple questions and answers in format:
+
+Q1: Question.
+A1: Answer.
+Q2:
+A2:
+……
+
+My text:"""{{text}}"""
+```
+
+
+
+
+
+### Get Collection Data List
+
+
+
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/dataset/data/v2/list' \
+--header 'Authorization: Bearer {{authorization}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "offset": 0,
+ "pageSize": 10,
+ "collectionId":"65abd4ac9d1448617cba6171",
+ "searchText":""
+}'
+```
+
+
+
+
+
+
+- offset: Offset (optional)
+- pageSize: Items per page, max 30 (optional)
+- collectionId: Collection ID(Required)
+- searchText: Fuzzy search term (optional)
+
+- dataId: Data ID
+- q: Primary data (optional)
+- a: Auxiliary data (optional)
+- indexes: Custom indexes (optional). See `Batch Add Data to Collection` for types. If custom indexes exist when created,
+
+- datasetId - Dataset ID
+- text - Text to test
+- limit - Maximum tokens
+- similarity - Minimum similarity (0~1, optional)
+- searchMode - Search mode: embedding | fullTextRecall | mixedRecall
+- usingReRank - Use rerank
+- datasetSearchUsingExtensionQuery - Use query extension
+- datasetSearchExtensionModel - Query extension model
+- datasetSearchExtensionBg - Query extension background description
+
+
+
+
+
+
+Returns top k results. limit is the maximum tokens, up to 20000 tokens.
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "data": [
+ {
+ "id": "65599c54a5c814fb803363cb",
+ "q": "你是谁",
+ "a": "I'm FastGPT Assistant",
+ "datasetId": "6554684f7f9ed18a39a4d15c",
+ "collectionId": "6556cd795e4b663e770bb66d",
+ "sourceName": "GBT 15104-2021 装饰单板贴面人造板.pdf",
+ "sourceId": "6556cd775e4b663e770bb65c",
+ "score": 0.8050316572189331
+ },
+ ......
+ ]
+}
+```
+
+
+
diff --git a/document/content/docs/openapi/index.en.mdx b/document/content/docs/openapi/index.en.mdx
new file mode 100644
index 0000000000..f02570cf22
--- /dev/null
+++ b/document/content/docs/openapi/index.en.mdx
@@ -0,0 +1,8 @@
+---
+title: OpenAPI Documentation
+description: FastGPT OpenAPI Documentation
+---
+
+import { Redirect } from '@/components/docs/Redirect';
+
+
diff --git a/document/content/docs/openapi/intro.en.mdx b/document/content/docs/openapi/intro.en.mdx
new file mode 100644
index 0000000000..81ab14e88c
--- /dev/null
+++ b/document/content/docs/openapi/intro.en.mdx
@@ -0,0 +1,88 @@
+---
+title: OpenAPI Introduction
+description: FastGPT OpenAPI Introduction
+---
+
+## Automated API Documentation
+
+The automated API documentation covers all endpoints in the current version, regardless of whether they can be called via API Key.
+
+All future endpoints will be auto-generated, with documentation continuously improved.
+
+- [China Mainland API Documentation](https://cloud.fastgpt.cn/openapi)
+- [International API Documentation](https://cloud.fastgpt.io/openapi)
+
+## Usage Guide
+
+FastGPT OpenAPI lets you authenticate with an API Key to access FastGPT services and resources -- such as calling app chat endpoints, uploading knowledge base data, search testing, and more. For compatibility and security reasons, not all endpoints support API Key access.
+
+## How to Find Your BaseURL
+
+**Note: BaseURL is not an endpoint address -- it's the root URL for all endpoints. Requesting the BaseURL directly won't work.**
+
+
+
+## How to Get an API Key
+
+FastGPT has **2 types** of API Keys: a global key (cannot directly call app chat) and an app-specific key that includes an AppId (can directly call app chat).
+
+We recommend using `app-specific keys` only for app or chat-related endpoints, and `global keys` for everything else.
+
+| Global Key | App-Specific Key |
+| --------------------- | --------------------- |
+|  |  |
+
+
+## Basic Configuration
+
+In OpenAPI, all endpoints authenticate via Header.Authorization.
+
+```
+baseUrl: "http://localhost:3000/api"
+headers: {
+ Authorization: "Bearer {{apikey}}"
+}
+```
+
+**Example: Start an App Chat**
+
+```sh
+curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
+--header 'Authorization: Bearer fastgpt-xxxxxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "chatId": "111",
+ "stream": false,
+ "detail": false,
+ "messages": [
+ {
+ "content": "Who is the director",
+ "role": "user"
+ }
+ ]
+}'
+```
+
+## Custom User ID
+
+Since `v4.8.13`, you can pass a custom user ID that will be saved in the chat history.
+
+```sh
+curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
+--header 'Authorization: Bearer fastgpt-xxxxxx' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "chatId": "111",
+ "stream": false,
+ "detail": false,
+ "messages": [
+ {
+ "content": "Who is the director",
+ "role": "user"
+ }
+ ],
+ "customUid": "xxxxxx"
+}'
+```
+
+In the chat history, this record's user will be displayed as `xxxxxx`.
diff --git a/document/content/docs/openapi/meta.en.json b/document/content/docs/openapi/meta.en.json
new file mode 100644
index 0000000000..fc8e60e748
--- /dev/null
+++ b/document/content/docs/openapi/meta.en.json
@@ -0,0 +1,11 @@
+{
+ "root": true,
+ "title": "OpenAPI Documentation",
+ "pages": [
+ "intro",
+ "app",
+ "chat",
+ "dataset",
+ "share"
+ ]
+}
diff --git a/document/content/docs/openapi/share.en.mdx b/document/content/docs/openapi/share.en.mdx
new file mode 100644
index 0000000000..34614036f3
--- /dev/null
+++ b/document/content/docs/openapi/share.en.mdx
@@ -0,0 +1,372 @@
+---
+title: Share Link Authentication
+description: FastGPT Share Link Authentication
+---
+
+## Introduction
+
+In FastGPT V4.6.4, we changed how share links read data. A `localId` is generated for each user to identify them and pull chat history from the cloud. However, this only works on the same device and browser -- switching devices or clearing browser cache will lose those records. Due to this limitation, we only allow users to pull the last `20` records from the past `30 days`.
+
+Share link authentication is designed to quickly and securely integrate FastGPT's chat interface into your existing system with just 2 endpoints. This feature is only available in the commercial edition.
+
+## Usage Guide
+
+In the share link configuration, you can optionally fill in the `Identity Verification` field. This is the root URL for a `POST` request. Once configured, share link initialization, chat start, and chat completion will all send requests to specific endpoints under this URL. Below, we use `host` to represent the `identity verification root URL`. Your server only needs to return whether verification succeeded -- no other data is required. The format is as follows:
+
+### Unified Response Format
+
+```jsonc
+{
+ "success": true,
+ "message": "Error message",
+ "msg": "Same as message, error message",
+ "data": {
+ "uid": "Unique user identifier" // Required
+ }
+}
+```
+
+`FastGPT` checks whether `success` is `true` to decide if the user can proceed. `message` and `msg` are equivalent -- you can return either one. When `success` is not `true`, this error message will be displayed to the user.
+
+`uid` is the unique user identifier and must be returned. The ID format must be a string that does not contain `|`, `/`, or `\\` characters, with a length of 255 **bytes** or less. Otherwise, an `Invalid UID` error will be returned. The `uid` is used to pull and save chat history -- see the practical example below.
+
+### Flow Diagram
+
+
+
+## Configuration Guide
+
+### 1. Configure the Identity Verification URL
+
+
+
+Once configured, every time the share link is used, verification and reporting requests will be sent to the corresponding endpoints.
+
+You only need to configure the root URL here -- no need to specify the full request path.
+
+### 2. Add an Extra Query Parameter to the Share Link
+
+Add an extra parameter `authToken` to the share link URL. For example:
+
+Original link: `https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192`
+
+Full link: `https://share.fastgpt.io/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
+
+This `authToken` is typically a unique user credential (such as a token) generated by your system. FastGPT will include `token=[authToken]` in the `body` of the verification request.
+
+### 3. Implement the Chat Initialization Verification Endpoint
+
+
+
+
+```bash
+curl --location --request POST '{{host}}/shareAuth/init' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "token": "[authToken]"
+}'
+```
+
+
+
+
+
+```json
+{
+ "success": true,
+ "data": {
+ "uid": "Unique user identifier"
+ }
+}
+```
+
+The system will pull chat history for uid `username123` under this share link.
+
+
+
+
+
+```json
+{
+ "success": false,
+ "message": "Authentication failed"
+}
+```
+
+
+
+
+### 4. Implement the Pre-Chat Verification Endpoint
+
+
+
+
+```bash
+curl --location --request POST '{{host}}/shareAuth/start' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "token": "[authToken]",
+ "question": "User question",
+}'
+```
+
+
+
+
+
+```json
+{
+ "success": true,
+ "data": {
+ "uid": "Unique user identifier"
+ }
+}
+```
+
+
+
+
+
+```json
+{
+ "success": false,
+ "message": "Authentication failed"
+}
+```
+
+```json
+{
+ "success": false,
+ "message": "Content policy violation"
+}
+```
+
+
+
+
+### 5. Implement the Chat Result Reporting Endpoint (Optional)
+
+This endpoint has no required response format.
+
+The response data follows the same format as the [chat endpoint](/docs/openapi/intro/#response), with an additional `token` field.
+
+Key fields to note: `totalPoints` (total AI credits consumed), `token` (total token consumption)
+
+```bash
+curl --location --request POST '{{host}}/shareAuth/finish' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "token": "[authToken]",
+ "responseData": [
+ {
+ "moduleName": "core.module.template.Dataset search",
+ "moduleType": "datasetSearchNode",
+ "totalPoints": 1.5278,
+ "query": "导演是谁\n《铃芽之旅》的导演是谁?\n这部电影的导演是谁?\n谁是《铃芽之旅》的导演?",
+ "model": "Embedding-2(旧版,不推荐使用)",
+ "tokens": 1524,
+ "similarity": 0.83,
+ "limit": 400,
+ "searchMode": "embedding",
+ "searchUsingReRank": false,
+ "extensionModel": "FastAI-4k",
+ "extensionResult": "《铃芽之旅》的导演是谁?\n这部电影的导演是谁?\n谁是《铃芽之旅》的导演?",
+ "runningTime": 2.15
+ },
+ {
+ "moduleName": "AI 对话",
+ "moduleType": "chatNode",
+ "totalPoints": 0.593,
+ "model": "FastAI-4k",
+ "tokens": 593,
+ "query": "导演是谁",
+ "maxToken": 2000,
+ "quoteList": [
+ {
+ "id": "65bb346a53698398479a8854",
+ "q": "导演是谁?",
+ "a": "电影《铃芽之旅》的导演是新海诚。",
+ "chunkIndex": 0,
+ "datasetId": "65af9b947916ae0e47c834d2",
+ "collectionId": "65bb345c53698398479a868f",
+ "sourceName": "dataset - 2024-01-23T151114.198.csv",
+ "sourceId": "65bb345b53698398479a868d",
+ "score": [
+ {
+ "type": "embedding",
+ "value": 0.9377183318138123,
+ "index": 0
+ },
+ {
+ "type": "rrf",
+ "value": 0.06557377049180328,
+ "index": 0
+ }
+ ]
+ }
+ ],
+ "historyPreview": [
+ {
+ "obj": "Human",
+ "value": "使用 标记中的内容作为本次对话的参考:\n\n\n导演是谁?\n电影《铃芽之旅》的导演是新海诚。\n------\n电影《铃芽之旅》的编剧是谁?22\n新海诚是本片的编剧。\n------\n电影《铃芽之旅》的女主角是谁?\n电影的女主角是铃芽。\n------\n电影《铃芽之旅》的制作团队中有哪位著名人士?2\n川村元气是本片的制作团队成员之一。\n------\n你是谁?\n我是电影《铃芽之旅》助手\n------\n电影《铃芽之旅》男主角是谁?\n电影《铃芽之旅》男主角是宗像草太,由松村北斗配音。\n------\n电影《铃芽之旅》的作者新海诚写了一本小说,叫什么名字?\n小说名字叫《铃芽之旅》。\n------\n电影《铃芽之旅》的女主角是谁?\n电影《铃芽之旅》的女主角是岩户铃芽,由原菜乃华配音。\n------\n电影《铃芽之旅》的故事背景是什么?\n日本\n------\n谁担任电影《铃芽之旅》中岩户环的配音?\n深津绘里担任电影《铃芽之旅》中岩户环的配音。\n\n\n回答要求:\n- 如果你不清楚答案,你需要澄清。\n- 避免提及你是从 获取的知识。\n- 保持答案与 中描述的一致。\n- 使用 Markdown 语法优化回答格式。\n- 使用与问题相同的语言回答。\n\n问题:\"\"\"导演是谁\"\"\""
+ },
+ {
+ "obj": "AI",
+ "value": "电影《铃芽之旅》的导演是新海诚。"
+ }
+ ],
+ "contextTotalLen": 2,
+ "runningTime": 1.32
+ }
+ ]
+
+
+}'
+```
+
+**Full responseData Field Reference:**
+
+```ts
+type ResponseType = {
+ moduleType: FlowNodeTypeEnum; // Module type
+ moduleName: string; // Module name
+ moduleLogo?: string; // Logo
+ runningTime?: number; // Running time
+ query?: string; // User question / search query
+ textOutput?: string; // Text output
+
+ tokens?: number; // Total context tokens
+ model?: string; // Model used
+ contextTotalLen?: number; // Total context length
+ totalPoints?: number; // Total AI credits consumed
+
+ temperature?: number; // Temperature
+ maxToken?: number; // Model max tokens
+ quoteList?: SearchDataResponseItemType[]; // Citation list
+ historyPreview?: ChatItemType[]; // Context preview (history may be truncated)
+
+ similarity?: number; // Minimum similarity threshold
+ limit?: number; // Max citation tokens
+ searchMode?: `${DatasetSearchModeEnum}`; // Search mode
+ searchUsingReRank?: boolean; // Whether rerank is used
+ extensionModel?: string; // Query expansion model
+ extensionResult?: string; // Query expansion result
+ extensionTokens?: number; // Query expansion total token length
+
+ cqList?: ClassifyQuestionAgentItemType[]; // Question classification list
+ cqResult?: string; // Question classification result
+
+ extractDescription?: string; // Content extraction description
+ extractResult?: Record; // Content extraction result
+
+ params?: Record; // HTTP module params
+ body?: Record; // HTTP module body
+ headers?: Record; // HTTP module headers
+ httpResult?: Record; // HTTP module result
+
+ pluginOutput?: Record; // Plugin output
+ pluginDetail?: ChatHistoryItemResType[]; // Plugin details
+
+ isElseResult?: boolean; // Conditional result
+};
+```
+
+## Practical Example
+
+We'll use [Laf as the server](https://laf.dev/) to demonstrate how these 3 endpoints work.
+
+### 1. Create 3 Laf Endpoints
+
+
+
+
+
+
+In this endpoint, we require `token` to equal `fastgpt` to pass verification. (Not recommended for production -- avoid hardcoding values.)
+
+```ts
+import cloud from '@lafjs/cloud';
+
+export default async function (ctx: FunctionContext) {
+ const { token } = ctx.body;
+
+ // Token decoding logic omitted
+ if (token === 'fastgpt') {
+ return { success: true, data: { uid: 'user1' } };
+ }
+
+ return { success: false, message: 'Authentication failed' };
+}
+```
+
+
+
+
+
+In this endpoint, we require `token` to equal `fastgpt` to pass verification. Additionally, if the question contains a specific character, it returns an error to simulate content moderation.
+
+```ts
+import cloud from '@lafjs/cloud';
+
+export default async function (ctx: FunctionContext) {
+ const { token, question } = ctx.body;
+
+ // Token decoding logic omitted
+ if (token !== 'fastgpt') {
+ return { success: false, message: 'Authentication failed' };
+ }
+
+ if (question.includes('你')) {
+ return { success: false, message: 'Content policy violation' };
+ }
+
+ return { success: true, data: { uid: 'user1' } };
+}
+```
+
+
+
+
+
+The result reporting endpoint can handle custom logic as needed.
+
+```ts
+import cloud from '@lafjs/cloud';
+
+export default async function (ctx: FunctionContext) {
+ const { token, responseData } = ctx.body;
+
+ const total = responseData.reduce((sum, item) => sum + item.price, 0);
+ const amount = total / 100000;
+
+ // Database operations omitted
+
+ return {};
+}
+```
+
+
+
+
+### 2. Configure the Verification URL
+
+Copy any of the 3 endpoint URLs, e.g. `https://d8dns0.laf.dev/shareAuth/finish`, remove the `/shareAuth/finish` part, and enter the root URL `https://d8dns0.laf.dev` in the `Identity Verification` field.
+
+
+
+### 3. Modify the Share Link Parameters
+
+Original share link: `https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c`
+
+Modified: `https://share.fastgpt.io/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
+
+### 4. Test the Result
+
+1. Opening the original link or a link where `authToken` does not equal `fastgpt` will show an authentication error.
+2. Sending content that contains the filtered character will show a content policy violation error.
+
+## Use Cases
+
+This authentication method is typically used to embed the `share link` directly into your application. Before opening the share link in your app, you should append the `authToken` parameter.
+
+Beyond integrating with your existing user system, you can also implement a `balance` feature -- deduct user balance via the `result reporting` endpoint and check user balance via the `pre-chat verification` endpoint.
diff --git a/document/content/docs/openapi/translate_chat.py b/document/content/docs/openapi/translate_chat.py
new file mode 100644
index 0000000000..a861b11485
--- /dev/null
+++ b/document/content/docs/openapi/translate_chat.py
@@ -0,0 +1,329 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Read the Chinese file
+with open('chat.mdx', 'r', encoding='utf-8') as f:
+ lines = f.readlines()
+
+# Translation mappings for common terms
+translations = {
+ '对话接口': 'Chat API',
+ '如何获取': 'How to Get',
+ '可在应用详情的路径里获取': 'You can find the AppId in your application details URL',
+ '发起对话': 'Start a Conversation',
+ '该接口的 API Key 需使用': 'This API requires',
+ '应用特定的 key': 'an application-specific API key',
+ '否则会报错': 'or it will return an error',
+ '有些包调用时': 'Some packages require',
+ '需要添加': 'adding',
+ '路径,有些不需要,如果出现404情况,可补充': 'to the path. If you get a 404 error, try adding',
+ '重试': 'and retry',
+ '请求对话 Agent 和工作流': 'Request Chat Agent and Workflow',
+ '对话接口兼容': 'chat API is compatible with',
+ '的接口!如果你的项目使用的是标准的': "interface! If you're using the standard",
+ '官方接口,可以直接通过修改': 'official API, you can access FastGPT by simply changing the',
+ '来访问 FastGpt 应用,不过需要注意下面几个规则:': 'However, note these rules:',
+ '传入的': 'Parameters like',
+ '等参数字段均无效,这些字段由编排决定,不会根据 API 参数改变。': 'are ignored. These values are determined by your workflow configuration.',
+ '不会返回实际消耗': "Won't return actual",
+ '值,如果需要,可以设置': 'consumed. If needed, set',
+ ',并手动计算': 'and manually calculate',
+ '里的': 'from',
+ '值。': 'values.',
+ '请求': 'Request',
+ '基础请求示例': 'Basic Request Example',
+ '图片/文件请求示例': 'Image/File Request Example',
+ '参数说明': 'Parameters',
+ '仅': 'Only',
+ '有部分区别,其他参数一致。': 'differs slightly; other parameters are the same.',
+ '目前不支持上传文件,需上传到自己的对象存储中,获取对应的文件链接。': 'Direct file uploads are not supported. Upload files to your object storage and provide the URL.',
+ '图片链接': 'Image URL',
+ '文件名': 'Filename',
+ '文档链接,支持': 'Document URL. Supports',
+ '为时(不传入),不使用': 'When empty (not provided), FastGPT context is disabled. Context is built entirely from',
+ '提供的上下文功能,完全通过传入的': 'provided.',
+ '构建上下文。': '',
+ '为': 'When set to a',
+ '非空字符串': 'non-empty string',
+ '时,意味着使用': ', uses',
+ '进行对话,自动从': 'for the conversation. Automatically fetches history from the FastGPT database and uses the last',
+ '数据库取历史记录,并使用': 'message as the user question. Other messages are ignored. Ensure',
+ '数组最后一个内容作为用户问题,其余': 'is unique and under 250 characters (typically your system',
+ '会被忽略。请自行确保': "'s conversation ID).",
+ '唯一,长度小于250,通常可以是自己系统的对话框ID。': '',
+ '结构与': 'Structure matches',
+ '模式一致。': 'chat format.',
+ '如果传入,则会将该值作为本次对话的响应消息的 ID,FastGPT会自动将该 ID 存入数据库。请确保,在当前': 'If provided, this value will be used as the response message ID. FastGPT will store it in the database. Ensure',
+ '下,': 'is unique within the current',
+ '是唯一的。': '.',
+ '是否返回中间值(模块状态,响应的完整结果等),': 'Whether to return intermediate values (module status, complete response data, etc.).',
+ '模式': 'mode',
+ '下会通过': 'uses',
+ '进行区分,': 'to distinguish events.',
+ '非': 'Non-',
+ '结果保存在': 'results are in',
+ '中。': '.',
+ '模块变量,一个对象,会替换模块中,输入框内容里的': 'Module variables (object). Replaces',
+ '响应': 'Response',
+ '响应示例': 'Response Example',
+ '取值:': 'Event values:',
+ '返回给客户端的文本(最终会算作回答)': 'Text returned to client (counted as answer)',
+ '指定回复返回给客户端的文本(最终会算作回答)': 'Specified reply text returned to client (counted as answer)',
+ '执行工具': 'Tool execution',
+ '工具参数': 'Tool parameters',
+ '工具返回': 'Tool response',
+ '运行到的节点状态': 'Node status',
+ '节点完整响应': 'Complete node response',
+ '更新变量': 'Update variables',
+ '报错': 'Error',
+}
+
+# Start translation
+output = []
+for line in lines:
+ # Keep code blocks and special syntax as-is
+ if line.strip().startswith('```') or line.strip().startswith('curl') or line.strip().startswith('{') or line.strip().startswith('}') or line.strip().startswith('"') or line.strip().startswith('event:') or line.strip().startswith('data:') or '|' in line:
+ output.append(line)
+ continue
+
+ # Translate frontmatter
+ if line.strip().startswith('title:'):
+ output.append('title: Chat API\n')
+ continue
+ if line.strip().startswith('description:'):
+ output.append('description: FastGPT OpenAPI Chat Interface\n')
+ continue
+
+ # Keep MDX components as-is
+ if '' in line or '' in line or '