rm sqlite3 import (#10115)

This commit is contained in:
Bagatur 2023-09-01 17:14:06 -07:00 committed by GitHub
parent f8bca156d4
commit 9e196cb470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,9 @@ from __future__ import annotations
import json import json
import logging import logging
import sqlite3
import warnings import warnings
from typing import ( from typing import (
TYPE_CHECKING,
Any, Any,
Iterable, Iterable,
List, List,
@ -17,6 +17,9 @@ from langchain.docstore.document import Document
from langchain.embeddings.base import Embeddings from langchain.embeddings.base import Embeddings
from langchain.vectorstores.base import VectorStore from langchain.vectorstores.base import VectorStore
if TYPE_CHECKING:
import sqlite3
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -203,6 +206,8 @@ class SQLiteVSS(VectorStore):
@staticmethod @staticmethod
def create_connection(db_file: str) -> sqlite3.Connection: def create_connection(db_file: str) -> sqlite3.Connection:
import sqlite3
import sqlite_vss import sqlite_vss
connection = sqlite3.connect(db_file) connection = sqlite3.connect(db_file)