Home / Function/ test_qdrant_from_texts_reuses_same_collection() — langchain Function Reference

test_qdrant_from_texts_reuses_same_collection() — langchain Function Reference

Architecture documentation for the test_qdrant_from_texts_reuses_same_collection() function in test_from_texts.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  18b87573_4df5_dac6_9e22_93ced60e95bc["test_qdrant_from_texts_reuses_same_collection()"]
  7804b385_c130_47e1_2a48_71d688ae0935["test_from_texts.py"]
  18b87573_4df5_dac6_9e22_93ced60e95bc -->|defined in| 7804b385_c130_47e1_2a48_71d688ae0935
  style 18b87573_4df5_dac6_9e22_93ced60e95bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py lines 91–115

async def test_qdrant_from_texts_reuses_same_collection(
    location: str, vector_name: str | None
) -> None:
    """Test if Qdrant.afrom_texts reuses the same collection."""
    collection_name = uuid.uuid4().hex
    embeddings = ConsistentFakeEmbeddings()

    await Qdrant.afrom_texts(
        ["lorem", "ipsum", "dolor", "sit", "amet"],
        embeddings,
        collection_name=collection_name,
        vector_name=vector_name,
        location=location,
    )

    vec_store = await Qdrant.afrom_texts(
        ["foo", "bar"],
        embeddings,
        collection_name=collection_name,
        vector_name=vector_name,
        location=location,
    )

    client = vec_store.client
    assert client.count(collection_name).count == 7

Domain

Subdomains

Frequently Asked Questions

What does test_qdrant_from_texts_reuses_same_collection() do?
test_qdrant_from_texts_reuses_same_collection() 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_reuses_same_collection() defined?
test_qdrant_from_texts_reuses_same_collection() is defined in libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py at line 91.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free