test_qdrant_from_texts_recreates_collection_on_force_recreate() — langchain Function Reference
Architecture documentation for the test_qdrant_from_texts_recreates_collection_on_force_recreate() function in test_from_texts.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 51b3c63c_a454_8900_a630_a711918626cd["test_qdrant_from_texts_recreates_collection_on_force_recreate()"] 7804b385_c130_47e1_2a48_71d688ae0935["test_from_texts.py"] 51b3c63c_a454_8900_a630_a711918626cd -->|defined in| 7804b385_c130_47e1_2a48_71d688ae0935 style 51b3c63c_a454_8900_a630_a711918626cd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py lines 209–240
async def test_qdrant_from_texts_recreates_collection_on_force_recreate(
location: str,
vector_name: str | None,
) -> None:
"""Test if Qdrant.afrom_texts recreates the collection even if config mismatches."""
from qdrant_client import QdrantClient
collection_name = uuid.uuid4().hex
await Qdrant.afrom_texts(
["lorem", "ipsum", "dolor", "sit", "amet"],
ConsistentFakeEmbeddings(dimensionality=10),
collection_name=collection_name,
vector_name=vector_name,
location=location,
)
await Qdrant.afrom_texts(
["foo", "bar"],
ConsistentFakeEmbeddings(dimensionality=5),
collection_name=collection_name,
vector_name=vector_name,
force_recreate=True,
location=location,
)
client = QdrantClient(location=location, api_key=os.getenv("QDRANT_API_KEY"))
assert client.count(collection_name).count == 2
vector_params = client.get_collection(collection_name).config.params.vectors
if vector_name is not None:
vector_params = vector_params[vector_name] # type: ignore[index]
assert vector_params.size == 5 # type: ignore[union-attr]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_qdrant_from_texts_recreates_collection_on_force_recreate() do?
test_qdrant_from_texts_recreates_collection_on_force_recreate() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py.
Where is test_qdrant_from_texts_recreates_collection_on_force_recreate() defined?
test_qdrant_from_texts_recreates_collection_on_force_recreate() is defined in libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py at line 209.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free