initial structure implemented

docs -> _docs
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-12-01 14:20:56 +02:00
parent 9134c5db06
commit abc26d5c20
360 changed files with 3881 additions and 101 deletions
+34
View File
@@ -0,0 +1,34 @@
from typing import Optional
import numpy as np
class FaissIndexManager:
def __init__(self, dimension: int, index_type: str = "IVF"):
self._dimension = dimension
self._index_type = index_type
self._index = None
self._id_map: dict[int, str] = {}
def build_index(self, vectors: np.ndarray, ids: list[str]) -> bool:
raise NotImplementedError
def add_vectors(self, vectors: np.ndarray, ids: list[str]) -> bool:
raise NotImplementedError
def search(
self, query: np.ndarray, top_k: int = 10
) -> list[tuple[str, float]]:
raise NotImplementedError
def remove_vectors(self, ids: list[str]) -> bool:
raise NotImplementedError
def save_index(self, path: str) -> bool:
raise NotImplementedError
def load_index(self, path: str) -> bool:
raise NotImplementedError
def get_vector_count(self) -> int:
raise NotImplementedError