mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
rm sqlite3 import (#10115)
This commit is contained in:
parent
f8bca156d4
commit
9e196cb470
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user