refactor: 去重删除逻辑统一到 VectorDB.delete_by_source

This commit is contained in:
2026-07-10 15:27:52 +08:00
parent ebfae1f60c
commit 3308636086
6 changed files with 34 additions and 32 deletions
+5 -1
View File
@@ -21,7 +21,11 @@ _custom_registry: dict[str, type[Splitter]] = {}
def register_splitter(ext: str, splitter_cls: type[Splitter]) -> None:
"""注册自定义 Splitter 类."""
"""注册自定义 Splitter 类.
注意: 此函数非线程安全,请在程序启动时调用(单线程阶段)。
运行时动态注册需自行加锁。
"""
ext = ext.lower() if ext.startswith(".") else f".{ext}"
_custom_registry[ext] = splitter_cls