MCPcopy Create free account
hub / github.com/MinishLab/vicinity / insert

Method insert

vicinity/backends/faiss.py:157–161  ·  view source on GitHub ↗

Insert vectors into the backend.

(self, vectors: npt.NDArray)

Source from the content-addressed store, hash-verified

155 return list(zip(indices, distances))
156
157 def insert(self, vectors: npt.NDArray) -> None:
158 """Insert vectors into the backend."""
159 if self.arguments.metric == "cosine":
160 vectors = normalize(vectors)
161 self.index.add(vectors)
162
163 def delete(self, indices: list[int]) -> None:
164 """Delete vectors from the backend."""

Callers

nothing calls this directly

Calls 1

normalizeFunction · 0.90

Tested by

no test coverage detected