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

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/test_from_texts.py lines 244–262

def test_qdrant_from_texts_stores_metadatas(
    batch_size: int, content_payload_key: str, metadata_payload_key: str
) -> None:
    """Test end to end construction and search."""
    texts = ["foo", "bar", "baz"]
    metadatas = [{"page": i} for i in range(len(texts))]
    docsearch = Qdrant.from_texts(
        texts,
        ConsistentFakeEmbeddings(),
        metadatas=metadatas,
        location=":memory:",
        content_payload_key=content_payload_key,
        metadata_payload_key=metadata_payload_key,
        batch_size=batch_size,
    )
    output = docsearch.similarity_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/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/test_from_texts.py at line 244.

Analyze Your Own Codebase

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

Try Supermodel Free