|
19 | 19 | import pytest_asyncio |
20 | 20 | from langchain_core.documents import Document |
21 | 21 | from langchain_core.embeddings import DeterministicFakeEmbedding |
22 | | -from metadata_filtering_data import FILTERING_TEST_CASES, METADATAS, NEGATIVE_TEST_CASES |
23 | | -from sqlalchemy import text |
24 | | - |
25 | | -from langchain_google_cloud_sql_pg import Column, PostgresEngine, PostgresVectorStore |
26 | | -from langchain_google_cloud_sql_pg.indexes import DistanceStrategy, HNSWQueryOptions |
27 | | - |
28 | 22 | from langchain_postgres.v2.hybrid_search_config import ( |
29 | 23 | HybridSearchConfig, |
30 | 24 | reciprocal_rank_fusion, |
31 | 25 | weighted_sum_ranking, |
32 | 26 | ) |
| 27 | +from metadata_filtering_data import FILTERING_TEST_CASES, METADATAS, NEGATIVE_TEST_CASES |
| 28 | +from sqlalchemy import text |
| 29 | + |
| 30 | +from langchain_google_cloud_sql_pg import Column, PostgresEngine, PostgresVectorStore |
| 31 | +from langchain_google_cloud_sql_pg.indexes import DistanceStrategy, HNSWQueryOptions |
33 | 32 |
|
34 | 33 | DEFAULT_TABLE = "default" + str(uuid.uuid4()).replace("-", "_") |
35 | 34 | CUSTOM_TABLE = "custom" + str(uuid.uuid4()).replace("-", "_") |
36 | 35 | CUSTOM_TABLE_SYNC = "custom_sync" + str(uuid.uuid4()).replace("-", "_") |
37 | 36 | CUSTOM_FILTER_TABLE = "custom_filter" + str(uuid.uuid4()).replace("-", "_") |
38 | | -CUSTOM_FILTER_TABLE_SYNC = "custom_filter_sync" + str(uuid.uuid4()).replace( |
39 | | - "-", "_" |
40 | | -) |
| 37 | +CUSTOM_FILTER_TABLE_SYNC = "custom_filter_sync" + str(uuid.uuid4()).replace("-", "_") |
41 | 38 | VECTOR_SIZE = 768 |
42 | 39 |
|
43 | 40 | embeddings_service = DeterministicFakeEmbedding(size=VECTOR_SIZE) |
|
0 commit comments