Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert back to sqlite-vec from fork now upstream is fixed #632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ tree-sitter-java = "==0.23.5"
tree-sitter-javascript = "==0.23.1"
tree-sitter-python = "==0.23.6"
tree-sitter-rust = "==0.23.2"
sqlite-vec-sl-tmp = "==0.0.4"
alembic = "==1.14.0"
pygments = "==2.19.1"
sqlite-vec = "^0.1.6"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pin the version? So

sqlite-vec = "==0.1.6"

To avoid unexpected updates


[tool.poetry.group.dev.dependencies]
pytest = "==8.3.4"
Expand Down
4 changes: 2 additions & 2 deletions scripts/import_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sqlite3

import numpy as np
import sqlite_vec_sl_tmp
import sqlite_vec

from codegate.inference.inference_engine import LlamaCppInferenceEngine
from codegate.utils.utils import generate_vector_string
Expand All @@ -27,7 +27,7 @@ def __init__(self, jsonl_dir="data", vec_db_path="./sqlite_data/vectordb.db"):
def _get_connection(self):
conn = sqlite3.connect(self.vec_db_path)
conn.enable_load_extension(True)
sqlite_vec_sl_tmp.load(conn)
sqlite_vec.load(conn)
conn.enable_load_extension(False)
return conn

Expand Down
4 changes: 2 additions & 2 deletions src/codegate/storage/storage_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import List

import numpy as np
import sqlite_vec_sl_tmp
import sqlite_vec
import structlog

from codegate.config import Config
Expand Down Expand Up @@ -69,7 +69,7 @@ def _get_connection(self):
try:
conn = sqlite3.connect(self.db_path)
conn.enable_load_extension(True)
sqlite_vec_sl_tmp.load(conn)
sqlite_vec.load(conn)
conn.enable_load_extension(False)
return conn
except Exception as e:
Expand Down
5 changes: 2 additions & 3 deletions tests/pipeline/workspace/test_workspace.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import datetime
from unittest.mock import AsyncMock, patch

import pytest

from codegate.db.models import Session, Workspace, WorkspaceActive
from codegate.pipeline.workspace.commands import WorkspaceCommands, WorkspaceCrud
from codegate.db.models import WorkspaceActive
from codegate.pipeline.workspace.commands import WorkspaceCommands


@pytest.mark.asyncio
Expand Down
2 changes: 1 addition & 1 deletion tests/vectordb/test_sqlitevec.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@pytest.fixture(scope="module")
def mock_sqlite_vec():
with patch("sqlite_vec_sl_tmp.load") as mock_load:
with patch("sqlite_vec.load") as mock_load:
# Mock the vector similarity extension loading
def setup_vector_similarity(conn):
cursor = conn.cursor()
Expand Down
Loading