Home / Function/ test_qdrant_from_texts_stores_metadatas() — langchain Function Reference

test_qdrant_from_texts_stores_metadatas() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/async_api/test_from_texts.py lines 247–268

async def test_qdrant_from_texts_stores_metadatas(
    batch_size: int,
    content_payload_key: str,
    metadata_payload_key: str,
    qdrant_location: str,
) -> None:
    """Test end to end construction and search."""
    texts = ["foo", "bar", "baz"]
    metadatas = [{"page": i} for i in range(len(texts))]
    docsearch = await Qdrant.afrom_texts(
        texts,
        ConsistentFakeEmbeddings(),
        metadatas=metadatas,
        content_payload_key=content_payload_key,
        metadata_payload_key=metadata_payload_key,
        batch_size=batch_size,
        location=qdrant_location,
    )
    output = await docsearch.asimilarity_search("foo", k=1)
    assert_documents_equals(
        output, [Document(page_content="foo", metadata={"page": 0})]
    )

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free