File tree Expand file tree Collapse file tree 4 files changed +18
-14
lines changed
src/langchain_google_alloydb_pg Expand file tree Collapse file tree 4 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 20
20
from langchain_core .documents import Document
21
21
from langchain_core .embeddings import Embeddings
22
22
from langchain_core .vectorstores import VectorStore
23
-
24
- from .async_vectorstore import AsyncAlloyDBVectorStore
25
- from .engine import AlloyDBEngine
26
23
from langchain_postgres .v2 .indexes import (
27
24
DEFAULT_DISTANCE_STRATEGY ,
28
25
BaseIndex ,
29
26
DistanceStrategy ,
30
27
QueryOptions ,
31
28
)
32
29
30
+ from .async_vectorstore import AsyncAlloyDBVectorStore
31
+ from .engine import AlloyDBEngine
32
+
33
33
34
34
class AlloyDBVectorStore (VectorStore ):
35
35
"""Google AlloyDB Vector Store class"""
Original file line number Diff line number Diff line change 21
21
import pytest_asyncio
22
22
from langchain_core .documents import Document
23
23
from langchain_core .embeddings import DeterministicFakeEmbedding
24
- from sqlalchemy import text
25
-
26
- from langchain_google_alloydb_pg import AlloyDBEngine
27
- from langchain_google_alloydb_pg .async_vectorstore import AsyncAlloyDBVectorStore
28
- from langchain_google_alloydb_pg .indexes import (
24
+ from langchain_postgres .v2 .indexes import (
29
25
DEFAULT_INDEX_NAME_SUFFIX ,
30
26
DistanceStrategy ,
31
27
HNSWIndex ,
32
28
IVFFlatIndex ,
33
29
)
30
+ from sqlalchemy import text
31
+
32
+ from langchain_google_alloydb_pg import AlloyDBEngine
33
+ from langchain_google_alloydb_pg .async_vectorstore import AsyncAlloyDBVectorStore
34
34
35
35
DEFAULT_TABLE = "test_table" + str (uuid .uuid4 ()).replace ("-" , "_" )
36
36
DEFAULT_INDEX_NAME = DEFAULT_TABLE + DEFAULT_INDEX_NAME_SUFFIX
Original file line number Diff line number Diff line change 19
19
import pytest_asyncio
20
20
from langchain_core .documents import Document
21
21
from langchain_core .embeddings import DeterministicFakeEmbedding
22
+ from langchain_postgres .v2 .indexes import (
23
+ DistanceStrategy ,
24
+ HNSWQueryOptions ,
25
+ )
22
26
from metadata_filtering_data import FILTERING_TEST_CASES , METADATAS
23
27
from PIL import Image
24
28
from sqlalchemy import text
25
29
26
30
from langchain_google_alloydb_pg import AlloyDBEngine , Column
27
31
from langchain_google_alloydb_pg .async_vectorstore import AsyncAlloyDBVectorStore
28
32
from langchain_google_alloydb_pg .indexes import (
29
- DistanceStrategy ,
30
- HNSWQueryOptions ,
31
33
ScaNNQueryOptions ,
32
34
)
33
35
Original file line number Diff line number Diff line change 22
22
import sqlalchemy
23
23
from langchain_core .documents import Document
24
24
from langchain_core .embeddings import DeterministicFakeEmbedding
25
- from sqlalchemy import text
26
-
27
- from langchain_google_alloydb_pg import AlloyDBEngine , AlloyDBVectorStore
28
- from langchain_google_alloydb_pg .indexes import (
25
+ from langchain_postgres .v2 .indexes import (
29
26
DEFAULT_INDEX_NAME_SUFFIX ,
30
27
DistanceStrategy ,
31
28
HNSWIndex ,
32
29
IVFFlatIndex ,
30
+ )
31
+ from sqlalchemy import text
32
+
33
+ from langchain_google_alloydb_pg import AlloyDBEngine , AlloyDBVectorStore
34
+ from langchain_google_alloydb_pg .indexes import (
33
35
IVFIndex ,
34
36
ScaNNIndex ,
35
37
)
You can’t perform that action at this time.
0 commit comments