diff --git a/requirements.txt b/requirements.txt index 6ab5d1b..c1acd1a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ beautifulsoup4==4.13.4 -hf_xet==1.0.3 -langchain-community==0.3.21 +hf_xet==1.1.2 +langchain-community==0.3.24 langchain-elasticsearch==0.3.2 -langchain-huggingface==0.1.2 +langchain-huggingface==0.2.0 langchain-postgres==0.0.14 langchain-qdrant==0.2.0 -langchain-sqlserver==0.1.1 -langchain==0.3.23 -psycopg[binary]==3.2.6 +langchain-sqlserver==0.1.2 +langchain==0.3.25 +psycopg[binary]==3.2.9 psycopg2-binary==2.9.10 pyodbc==5.2.0 -pypdf==5.4.0 +pypdf==5.6.0 python-dotenv==1.1.0 -qdrant-client==1.13.3 +qdrant-client==1.14.2 redis==5.2.1 sentence-transformers==4.1.0 unstructured[md]==0.17.2 diff --git a/vector_db/mssql_provider.py b/vector_db/mssql_provider.py index c56722c..660c6df 100644 --- a/vector_db/mssql_provider.py +++ b/vector_db/mssql_provider.py @@ -134,9 +134,14 @@ def _ensure_database_exists(self) -> None: f"IF DB_ID('{database}') IS NULL CREATE DATABASE [{database}]" ) cursor.close() - except Exception as e: + except pyodbc.ProgrammingError as e: + if "1801" in str(e): + logger.info("Database %s already exists, continuing", database) + return logger.exception("Failed to ensure database '%s' exists", database) - raise RuntimeError(f"Failed to ensure database '{database}' exists: {e}") + raise RuntimeError( + f"Failed to ensure database '{database}' exists: {e}" + ) from e def add_documents(self, docs: List[Document]) -> None: """