Skip to content

Commit e49c72f

Browse files
lukehindsaponcedeleonch
andauthoredJan 21, 2025··
Revert back to sqlite-vec from fork now upstream is fixed (#632)
* Revert back to sqlite-vec from fork now upstream is fixed asg017/sqlite-vec@cc7c29e * Pin version * Poetry lock update * remove sqlive-vec-tmp * updated lock file --------- Co-authored-by: Alejandro Ponce <[email protected]>
1 parent 8ae8b21 commit e49c72f

File tree

5 files changed

+31
-127
lines changed

5 files changed

+31
-127
lines changed
 

‎poetry.lock

+25-121
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ tree-sitter-java = "==0.23.5"
2626
tree-sitter-javascript = "==0.23.1"
2727
tree-sitter-python = "==0.23.6"
2828
tree-sitter-rust = "==0.23.2"
29-
sqlite-vec-sl-tmp = "==0.0.4"
3029
alembic = "==1.14.1"
3130
pygments = "==2.19.1"
31+
sqlite-vec = "==0.1.6"
3232

3333
[tool.poetry.group.dev.dependencies]
3434
pytest = "==8.3.4"

‎scripts/import_packages.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sqlite3
66

77
import numpy as np
8-
import sqlite_vec_sl_tmp
8+
import sqlite_vec
99

1010
from codegate.inference.inference_engine import LlamaCppInferenceEngine
1111
from codegate.utils.utils import generate_vector_string
@@ -27,7 +27,7 @@ def __init__(self, jsonl_dir="data", vec_db_path="./sqlite_data/vectordb.db"):
2727
def _get_connection(self):
2828
conn = sqlite3.connect(self.vec_db_path)
2929
conn.enable_load_extension(True)
30-
sqlite_vec_sl_tmp.load(conn)
30+
sqlite_vec.load(conn)
3131
conn.enable_load_extension(False)
3232
return conn
3333

‎src/codegate/storage/storage_engine.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import List
55

66
import numpy as np
7-
import sqlite_vec_sl_tmp
7+
import sqlite_vec
88
import structlog
99

1010
from codegate.config import Config
@@ -69,7 +69,7 @@ def _get_connection(self):
6969
try:
7070
conn = sqlite3.connect(self.db_path)
7171
conn.enable_load_extension(True)
72-
sqlite_vec_sl_tmp.load(conn)
72+
sqlite_vec.load(conn)
7373
conn.enable_load_extension(False)
7474
return conn
7575
except Exception as e:

‎tests/vectordb/test_sqlitevec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@pytest.fixture(scope="module")
1212
def mock_sqlite_vec():
13-
with patch("sqlite_vec_sl_tmp.load") as mock_load:
13+
with patch("sqlite_vec.load") as mock_load:
1414
# Mock the vector similarity extension loading
1515
def setup_vector_similarity(conn):
1616
cursor = conn.cursor()

0 commit comments

Comments
 (0)
Please sign in to comment.