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

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_texts.py lines 119–152

def test_qdrant_from_texts_reuses_same_collection(
    location: str,
    retrieval_mode: RetrievalMode,
    vector_name: str,
    sparse_vector_name: str,
) -> None:
    """Test if Qdrant.from_texts reuses the same collection."""
    collection_name = uuid.uuid4().hex
    embeddings = ConsistentFakeEmbeddings()
    sparse_embeddings = ConsistentFakeSparseEmbeddings()
    vec_store = QdrantVectorStore.from_texts(
        ["lorem", "ipsum", "dolor", "sit", "amet"],
        embeddings,
        collection_name=collection_name,
        location=location,
        vector_name=vector_name,
        retrieval_mode=retrieval_mode,
        sparse_vector_name=sparse_vector_name,
        sparse_embedding=sparse_embeddings,
    )
    del vec_store

    vec_store = QdrantVectorStore.from_texts(
        ["foo", "bar"],
        embeddings,
        collection_name=collection_name,
        location=location,
        vector_name=vector_name,
        retrieval_mode=retrieval_mode,
        sparse_vector_name=sparse_vector_name,
        sparse_embedding=sparse_embeddings,
    )

    assert vec_store.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/qdrant_vector_store/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/qdrant_vector_store/test_from_texts.py at line 119.

Analyze Your Own Codebase

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

Try Supermodel Free