test_qdrant_from_existing_collection_uses_same_collection() — langchain Function Reference
Architecture documentation for the test_qdrant_from_existing_collection_uses_same_collection() function in test_from_existing_collection.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 94ffcdad_e80a_9103_88af_80c5b5b765d4["test_qdrant_from_existing_collection_uses_same_collection()"] eef13552_d727_8350_d831_795f2a274061["test_from_existing_collection.py"] 94ffcdad_e80a_9103_88af_80c5b5b765d4 -->|defined in| eef13552_d727_8350_d831_795f2a274061 style 94ffcdad_e80a_9103_88af_80c5b5b765d4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/test_from_existing_collection.py lines 11–37
def test_qdrant_from_existing_collection_uses_same_collection(vector_name: str) -> None:
"""Test if the Qdrant.from_existing_collection reuses the same collection."""
from qdrant_client import QdrantClient
collection_name = uuid.uuid4().hex
with tempfile.TemporaryDirectory() as tmpdir:
docs = ["foo"]
qdrant = Qdrant.from_texts(
docs,
embedding=ConsistentFakeEmbeddings(),
path=str(tmpdir),
collection_name=collection_name,
vector_name=vector_name,
)
del qdrant
qdrant = Qdrant.from_existing_collection(
embedding=ConsistentFakeEmbeddings(),
path=str(tmpdir),
collection_name=collection_name,
vector_name=vector_name,
)
qdrant.add_texts(["baz", "bar"])
del qdrant
client = QdrantClient(path=str(tmpdir))
assert client.count(collection_name).count == 3
Domain
Subdomains
Source
Frequently Asked Questions
What does test_qdrant_from_existing_collection_uses_same_collection() do?
test_qdrant_from_existing_collection_uses_same_collection() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/test_from_existing_collection.py.
Where is test_qdrant_from_existing_collection_uses_same_collection() defined?
test_qdrant_from_existing_collection_uses_same_collection() is defined in libs/partners/qdrant/tests/integration_tests/test_from_existing_collection.py at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free