Home / Function/ test_qdrant_add_texts_stores_ids() — langchain Function Reference

test_qdrant_add_texts_stores_ids() — langchain Function Reference

Architecture documentation for the test_qdrant_add_texts_stores_ids() function in test_add_texts.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ee794b45_eb17_85cd_1566_40c803b298ee["test_qdrant_add_texts_stores_ids()"]
  cfb482fe_7880_43f9_b1d4_600dadb066ca["test_add_texts.py"]
  ee794b45_eb17_85cd_1566_40c803b298ee -->|defined in| cfb482fe_7880_43f9_b1d4_600dadb066ca
  style ee794b45_eb17_85cd_1566_40c803b298ee fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_add_texts.py lines 113–143

def test_qdrant_add_texts_stores_ids(
    location: str,
    vector_name: str,
    retrieval_mode: RetrievalMode,
    sparse_vector_name: str,
    batch_size: int,
) -> None:
    """Test end to end Qdrant.add_texts stores provided ids."""
    ids: list[str | int] = [
        "fa38d572-4c31-4579-aedc-1960d79df6df",
        432,
        432145435,
    ]
    collection_name = uuid.uuid4().hex
    vec_store = QdrantVectorStore.from_texts(
        ["abc", "def", "ghi"],
        ConsistentFakeEmbeddings(),
        ids=ids,
        collection_name=collection_name,
        location=location,
        vector_name=vector_name,
        retrieval_mode=retrieval_mode,
        sparse_vector_name=sparse_vector_name,
        sparse_embedding=ConsistentFakeSparseEmbeddings(),
        batch_size=batch_size,
    )

    assert vec_store.client.count(collection_name).count == 3
    stored_ids = [point.id for point in vec_store.client.scroll(collection_name)[0]]
    assert set(ids) == set(stored_ids)
    assert len(vec_store.get_by_ids(ids)) == 3

Domain

Subdomains

Frequently Asked Questions

What does test_qdrant_add_texts_stores_ids() do?
test_qdrant_add_texts_stores_ids() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_add_texts.py.
Where is test_qdrant_add_texts_stores_ids() defined?
test_qdrant_add_texts_stores_ids() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_add_texts.py at line 113.

Analyze Your Own Codebase

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

Try Supermodel Free