test_aembed_documents_batch() — langchain Function Reference
Architecture documentation for the test_aembed_documents_batch() function in test_caching.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2575e495_3e57_7d1a_fd75_620874dd22db["test_aembed_documents_batch()"] 6b1a1e58_d1bc_2756_cc7d_9c01f64a73a2["test_caching.py"] 2575e495_3e57_7d1a_fd75_620874dd22db -->|defined in| 6b1a1e58_d1bc_2756_cc7d_9c01f64a73a2 style 2575e495_3e57_7d1a_fd75_620874dd22db fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/embeddings/test_caching.py lines 127–141
async def test_aembed_documents_batch(
cache_embeddings_batch: CacheBackedEmbeddings,
) -> None:
# "RAISE_EXCEPTION" forces a failure in batch 2
texts = ["1", "22", "a", "333", "RAISE_EXCEPTION"]
with contextlib.suppress(ValueError):
await cache_embeddings_batch.aembed_documents(texts)
keys = [
key
async for key in cache_embeddings_batch.document_embedding_store.ayield_keys()
]
# only the first batch of three embeddings should exist
assert len(keys) == 3
# UUID is expected to be the same for the same text
assert keys[0] == "test_namespace812b86c1-8ebf-5483-95c6-c95cf2b52d12"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_aembed_documents_batch() do?
test_aembed_documents_batch() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/embeddings/test_caching.py.
Where is test_aembed_documents_batch() defined?
test_aembed_documents_batch() is defined in libs/langchain/tests/unit_tests/embeddings/test_caching.py at line 127.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free