Initial commit

This commit is contained in:
yichuan520030910320
2025-06-30 09:05:05 +00:00
commit 46f6cc100b
1231 changed files with 278432 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# packages/leann-core/src/leann/registry.py
# 全局的后端注册表字典
BACKEND_REGISTRY = {}
def register_backend(name: str):
"""一个用于注册新后端类的装饰器。"""
def decorator(cls):
print(f"INFO: Registering backend '{name}'")
BACKEND_REGISTRY[name] = cls
return cls
return decorator