Home / Function/ test_qdrant_from_texts_raises_error_on_different_dimensionality() — langchain Function Reference

test_qdrant_from_texts_raises_error_on_different_dimensionality() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  56df11f4_9314_c896_7bf4_0d7d0b215772["test_qdrant_from_texts_raises_error_on_different_dimensionality()"]
  a57b717d_2d4d_3890_29a0_1fe4629dbfac["test_from_texts.py"]
  56df11f4_9314_c896_7bf4_0d7d0b215772 -->|defined in| a57b717d_2d4d_3890_29a0_1fe4629dbfac
  style 56df11f4_9314_c896_7bf4_0d7d0b215772 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/test_from_texts.py lines 121–143

def test_qdrant_from_texts_raises_error_on_different_dimensionality(
    vector_name: str | None,
) -> None:
    """Test if Qdrant.from_texts raises an exception if dimensionality doesn't match."""
    collection_name = uuid.uuid4().hex
    with tempfile.TemporaryDirectory() as tmpdir:
        vec_store = Qdrant.from_texts(
            ["lorem", "ipsum", "dolor", "sit", "amet"],
            ConsistentFakeEmbeddings(dimensionality=10),
            collection_name=collection_name,
            path=str(tmpdir),
            vector_name=vector_name,
        )
        del vec_store

        with pytest.raises(QdrantException):
            Qdrant.from_texts(
                ["foo", "bar"],
                ConsistentFakeEmbeddings(dimensionality=5),
                collection_name=collection_name,
                path=str(tmpdir),
                vector_name=vector_name,
            )

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free