feat: hnsw embedding server and csr format
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
# packages/leann-core/src/leann/registry.py
|
||||
|
||||
# 全局的后端注册表字典
|
||||
BACKEND_REGISTRY = {}
|
||||
from typing import Dict, TYPE_CHECKING
|
||||
if TYPE_CHECKING:
|
||||
from leann.interface import LeannBackendFactoryInterface
|
||||
|
||||
BACKEND_REGISTRY: Dict[str, 'LeannBackendFactoryInterface'] = {}
|
||||
|
||||
def register_backend(name: str):
|
||||
"""一个用于注册新后端类的装饰器。"""
|
||||
"""A decorator to register a new backend class."""
|
||||
def decorator(cls):
|
||||
print(f"INFO: Registering backend '{name}'")
|
||||
BACKEND_REGISTRY[name] = cls
|
||||
|
||||
Reference in New Issue
Block a user