2024-04-24 21:52:42 +08:00
|
|
|
from core.rag.datasource.vdb.qdrant.qdrant_vector import QdrantConfig, QdrantVector
|
|
|
|
from tests.integration_tests.vdb.test_vector_store import (
|
2024-04-27 16:36:09 +08:00
|
|
|
AbstractVectorTest,
|
2024-04-24 21:52:42 +08:00
|
|
|
setup_mock_redis,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2024-04-27 16:36:09 +08:00
|
|
|
class QdrantVectorTest(AbstractVectorTest):
|
2024-04-25 18:55:49 +08:00
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
2024-08-23 23:52:25 +08:00
|
|
|
self.attributes = ["doc_id", "dataset_id", "document_id", "doc_hash"]
|
2024-04-25 18:55:49 +08:00
|
|
|
self.vector = QdrantVector(
|
|
|
|
collection_name=self.collection_name,
|
|
|
|
group_id=self.dataset_id,
|
|
|
|
config=QdrantConfig(
|
2024-08-23 23:52:25 +08:00
|
|
|
endpoint="http://localhost:6333",
|
|
|
|
api_key="difyai123456",
|
|
|
|
),
|
2024-04-24 21:52:42 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2024-04-25 18:55:49 +08:00
|
|
|
def test_qdrant_vector(setup_mock_redis):
|
2024-04-27 16:36:09 +08:00
|
|
|
QdrantVectorTest().run_all_tests()
|