Home / Function/ test_qdrant_from_texts_stores_ids() — langchain Function Reference

test_qdrant_from_texts_stores_ids() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  a0c8b7fc_ab6c_4502_1405_fe50cf12e131["test_qdrant_from_texts_stores_ids()"]
  911ffb0f_3570_ae90_9ff9_2c9c03151aea["test_from_texts.py"]
  a0c8b7fc_ab6c_4502_1405_fe50cf12e131 -->|defined in| 911ffb0f_3570_ae90_9ff9_2c9c03151aea
  style a0c8b7fc_ab6c_4502_1405_fe50cf12e131 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_texts.py lines 44–72

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

    assert vec_store.client.count(collection_name).count == 2
    stored_ids = [point.id for point in vec_store.client.retrieve(collection_name, ids)]
    assert set(ids) == set(stored_ids)

Domain

Subdomains

Frequently Asked Questions

What does test_qdrant_from_texts_stores_ids() do?
test_qdrant_from_texts_stores_ids() 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_stores_ids() defined?
test_qdrant_from_texts_stores_ids() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_texts.py at line 44.

Analyze Your Own Codebase

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

Try Supermodel Free