mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-23 02:46:35 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user