Home / Function/ test_chroma_async_with_ids() — langchain Function Reference

test_chroma_async_with_ids() — langchain Function Reference

Architecture documentation for the test_chroma_async_with_ids() function in test_vectorstores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  4e56a4af_911b_399e_5f37_c05361e718e6["test_chroma_async_with_ids()"]
  289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"]
  4e56a4af_911b_399e_5f37_c05361e718e6 -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8
  style 4e56a4af_911b_399e_5f37_c05361e718e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 107–122

async def test_chroma_async_with_ids() -> None:
    """Test end to end construction and search."""
    texts = ["foo", "bar", "baz"]
    ids = [f"id_{i}" for i in range(len(texts))]
    docsearch = Chroma.from_texts(
        collection_name="test_collection",
        texts=texts,
        embedding=FakeEmbeddings(),
        ids=ids,
    )
    output = await docsearch.asimilarity_search("foo", k=1)

    docsearch.delete_collection()
    assert len(output) == 1
    assert output[0].page_content == "foo"
    assert output[0].id == "id_0"

Domain

Subdomains

Frequently Asked Questions

What does test_chroma_async_with_ids() do?
test_chroma_async_with_ids() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_chroma_async_with_ids() defined?
test_chroma_async_with_ids() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 107.

Analyze Your Own Codebase

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

Try Supermodel Free