fix: 修复 MarkdownSplitter 死循环 + 添加 GPU 自动检测
- ingest.py: _split_single_paragraph 中分隔符距 start 小于 overlap 时 start 会回退为负数,Python rfind 负索引导致无限循环 修复: start = max(start + 1, next_start) 确保始终前进 - embedder.py: LocalEmbedder 自动检测 CUDA,优先使用 GPU - ingest_obsidian.py: MAX_SIZE 调整为 200KB 适配 GPU 嵌入 - 清理临时日志文件
This commit is contained in:
@@ -8,7 +8,7 @@ from src.core.db import VectorDB
|
||||
from src.core.embedder import create_embedder
|
||||
from src.core.ingest import DocumentIngestor
|
||||
|
||||
MAX_SIZE = 50_000 # 跳过 >50KB 的文件
|
||||
MAX_SIZE = 200_000 # GPU 嵌入,无需跳过
|
||||
|
||||
progress_file = Path(__file__).parent.parent / "ingest_progress.txt"
|
||||
def log(msg):
|
||||
|
||||
Reference in New Issue
Block a user