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
  28f335bc_a95c_c242_76a4_f9ee4c8875e5["test_qdrant_from_texts_reuses_same_collection()"]
  a57b717d_2d4d_3890_29a0_1fe4629dbfac["test_from_texts.py"]
  28f335bc_a95c_c242_76a4_f9ee4c8875e5 -->|defined in| a57b717d_2d4d_3890_29a0_1fe4629dbfac
  style 28f335bc_a95c_c242_76a4_f9ee4c8875e5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

def test_qdrant_from_texts_reuses_same_collection(vector_name: str | None) -> None:
    """Test if Qdrant.from_texts reuses the same collection."""
    from qdrant_client import QdrantClient

    collection_name = uuid.uuid4().hex
    embeddings = ConsistentFakeEmbeddings()
    with tempfile.TemporaryDirectory() as tmpdir:
        vec_store = Qdrant.from_texts(
            ["lorem", "ipsum", "dolor", "sit", "amet"],
            embeddings,
            collection_name=collection_name,
            path=str(tmpdir),
            vector_name=vector_name,
        )
        del vec_store

        vec_store = Qdrant.from_texts(
            ["foo", "bar"],
            embeddings,
            collection_name=collection_name,
            path=str(tmpdir),
            vector_name=vector_name,
        )
        del vec_store

        client = QdrantClient(path=str(tmpdir))
        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/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/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