Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit e16ed92

Browse files
author
Luke Hinds
authored
Merge pull request #465 from stacklok/vec-port
Vec port
2 parents b45f8d5 + 97dddcc commit e16ed92

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

poetry.lock

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ greenlet = "^3.0.3"
2020
aiosqlite = "^0.20.0"
2121
ollama = ">=0.4.4"
2222
pydantic-settings = "^2.7.0"
23-
sqlite-vec = ">=0.1.0"
2423
numpy = ">=1.24.0"
2524
tree-sitter = ">=0.23.2"
2625
tree-sitter-go = ">=0.23.4"
@@ -29,6 +28,7 @@ tree-sitter-javascript = ">=0.23.1"
2928
tree-sitter-python = ">=0.23.6"
3029
tree-sitter-rust = ">=0.23.2"
3130

31+
sqlite-vec-sl-tmp = "0.0.3"
3232
[tool.poetry.group.dev.dependencies]
3333
pytest = ">=7.4.0"
3434
pytest-cov = ">=4.1.0"

scripts/import_packages.py

Lines changed: 2 additions & 2 deletions
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
8+
import sqlite_vec_sl_tmp
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", db_path="./sqlite_data/vectordb.db"):
2727
def _get_connection(self):
2828
conn = sqlite3.connect(self.db_path)
2929
conn.enable_load_extension(True)
30-
sqlite_vec.load(conn)
30+
sqlite_vec_sl_tmp.load(conn)
3131
conn.enable_load_extension(False)
3232
return conn
3333

src/codegate/storage/storage_engine.py

Lines changed: 2 additions & 2 deletions
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
7+
import sqlite_vec_sl_tmp
88
import structlog
99

1010
from codegate.config import Config
@@ -62,7 +62,7 @@ def _get_connection(self):
6262
try:
6363
conn = sqlite3.connect(self.db_path)
6464
conn.enable_load_extension(True)
65-
sqlite_vec.load(conn)
65+
sqlite_vec_sl_tmp.load(conn)
6666
conn.enable_load_extension(False)
6767
return conn
6868
except Exception as e:

tests/vectordb/test_sqlitevec.py

Lines changed: 1 addition & 1 deletion
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.load") as mock_load:
13+
with patch("sqlite_vec_sl_tmp.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)