test_chroma_add_documents_mixed_metadata() — langchain Function Reference
Architecture documentation for the test_chroma_add_documents_mixed_metadata() function in test_vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8b16f676_65cd_e2b3_402a_7446e75a6320["test_chroma_add_documents_mixed_metadata()"] 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"] 8b16f676_65cd_e2b3_402a_7446e75a6320 -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8 style 8b16f676_65cd_e2b3_402a_7446e75a6320 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 578–593
def test_chroma_add_documents_mixed_metadata() -> None:
db = Chroma(embedding_function=FakeEmbeddings())
docs = [
Document(page_content="foo", id="0"),
Document(page_content="bar", metadata={"baz": 1}, id="1"),
]
ids = ["0", "1"]
actual_ids = db.add_documents(docs)
search = db.similarity_search("foo bar")
db.delete_collection()
assert actual_ids == ids
assert sorted(search, key=lambda d: d.page_content) == sorted(
docs,
key=lambda d: d.page_content,
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_chroma_add_documents_mixed_metadata() do?
test_chroma_add_documents_mixed_metadata() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_chroma_add_documents_mixed_metadata() defined?
test_chroma_add_documents_mixed_metadata() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 578.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free