ruff fix
This commit is contained in:
@@ -74,7 +74,7 @@ class ChromeHistoryReader(BaseReader):
|
||||
if count >= max_count and max_count > 0:
|
||||
break
|
||||
|
||||
last_visit, url, title, visit_count, typed_count, hidden = row
|
||||
last_visit, url, title, visit_count, typed_count, _ = row
|
||||
|
||||
# Create document content with metadata embedded in text
|
||||
doc_content = f"""
|
||||
|
||||
@@ -289,11 +289,8 @@ def add_incremental(
|
||||
embeddings = _np.ascontiguousarray(embeddings, dtype=_np.float32)
|
||||
|
||||
# Append using FAISS-style signature (n, swig_ptr(x)); fall back to Python wrapper if needed
|
||||
try:
|
||||
index.add(embeddings.shape[0], hnsw_faiss.swig_ptr(embeddings))
|
||||
except TypeError:
|
||||
# Some builds expose a Python-friendly signature: index.add(np.ndarray)
|
||||
index.add(embeddings)
|
||||
index.add(embeddings.shape[0], hnsw_faiss.swig_ptr(embeddings))
|
||||
|
||||
hnsw_faiss.write_index(index, str(faiss_index_file))
|
||||
|
||||
print(f"Incremental add completed. Index updated at: {index_path}")
|
||||
|
||||
Reference in New Issue
Block a user