Files
2026-06-01 13:03:20 +08:00

80 lines
2.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 环境配置
environment: "development"
server:
port: 8087
host: "0.0.0.0"
log:
level: "info"
path: "logs"
# The number of log files to retain (default: 20)
retain_days: 20
# 文档解析配置
document_parser:
# 并发控制
max_concurrent: 5
queue_size: 1000
# 超时设置(统一超时配置)
download_timeout: 3600
processing_timeout: 3600 # 60分钟用于MinerU和MarkItDown解析超时
# MinerU配置
mineru:
# 后端选择pipeline|vlm-transformers|vlm-sglang-engine|vlm-sglang-client, 有cuda环境目前推荐: vlm-transformers
backend: "pipeline"
python_path: "./venv/bin/python" # 默认使用虚拟环境如不存在则自动检测系统Python
# 这个是mineru的并发数目前没用,占位使用,只需要小于document_parser.max_concurrent 即可
max_concurrent: 1
queue_size: 100
# timeout 已移除,统一使用 document_parser.processing_timeout (3600秒)
batch_size: 1
quality_level: "Balanced"
# 单进程最大GPU显存占用(GB)仅对pipeline后端,这个是一个软上限
vram: 8
# MarkItDown配置
markitdown:
python_path: "./venv/bin/python" # 默认使用虚拟环境如不存在则自动检测系统Python
# timeout 已移除,统一使用 document_parser.processing_timeout (3600秒)
enable_plugins: false
# 功能开关
features:
ocr: true
audio_transcription: true
azure_doc_intel: false
youtube_transcription: false
# 存储配置
storage:
# Sled数据库配置
sled:
path: "data/document_parser"
cache_capacity: 104857600 # 100MB
# OSS配置
oss:
endpoint: "oss-rg-china-mainland.aliyuncs.com"
# 公共bucket用于存储公共文件如文档文件
public_bucket: "nuwa-packages"
# 私有bucket用于存储私有文件如模型文件
private_bucket: "edu-nuwa-packages"
access_key_id: "${OSS_ACCESS_KEY_ID}" # 通过环境变量设置
access_key_secret: "${OSS_ACCESS_KEY_SECRET}" # 通过环境变量设置
region: "oss-rg-china-mainland"
upload_directory: "document_parser" # 上传文件的统一子目录前缀
# 全局文件大小配置
file_size_config:
max_file_size: "200MB"
large_document_threshold: "50MB"
# 外部集成配置
external_integration:
webhook_url: ""
api_key: ""
timeout: 30