test_chroma_large_batch_update() — langchain Function Reference
Architecture documentation for the test_chroma_large_batch_update() function in test_vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5f0f74b0_65f1_543c_602b_7030b4ad88c1["test_chroma_large_batch_update()"] 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"] 5f0f74b0_65f1_543c_602b_7030b4ad88c1 -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8 style 5f0f74b0_65f1_543c_602b_7030b4ad88c1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 646–672
def test_chroma_large_batch_update() -> None:
client = chromadb.HttpClient()
embedding_function = MyEmbeddingFunction(fak=Fak(size=255))
col = client.get_or_create_collection(
"my_collection",
embedding_function=embedding_function, # type: ignore[arg-type]
)
docs = ["This is a test document"] * (client.get_max_batch_size() + 100)
ids = [str(uuid.uuid4()) for _ in range(len(docs))]
db = Chroma.from_texts(
client=client,
collection_name=col.name,
texts=docs,
embedding=embedding_function.fak,
ids=ids,
)
new_docs = [
Document(
page_content="This is a new test document",
metadata={"doc_id": f"{i}"},
)
for i in range(len(docs) - 10)
]
new_ids = list(ids[: len(new_docs)])
db.update_documents(ids=new_ids, documents=new_docs)
db.delete_collection()
Domain
Subdomains
Source
Frequently Asked Questions
What does test_chroma_large_batch_update() do?
test_chroma_large_batch_update() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_chroma_large_batch_update() defined?
test_chroma_large_batch_update() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 646.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free