test_async_pass_run_id() — langchain Function Reference
Architecture documentation for the test_async_pass_run_id() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 82da2994_2152_a8e2_21b3_647ac61a3a33["test_async_pass_run_id()"] 8830054d_ac1e_daa9_c6c5_ff55b10d0bf3["test_base.py"] 82da2994_2152_a8e2_21b3_647ac61a3a33 -->|defined in| 8830054d_ac1e_daa9_c6c5_ff55b10d0bf3 style 82da2994_2152_a8e2_21b3_647ac61a3a33 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/language_models/chat_models/test_base.py lines 336–349
async def test_async_pass_run_id() -> None:
llm = FakeListChatModel(responses=["a", "b", "c"])
cb = FakeTracer()
uid1 = uuid.uuid4()
await llm.ainvoke("Dummy message", {"callbacks": [cb], "run_id": uid1})
assert cb.traced_run_ids == [uid1]
uid2 = uuid.uuid4()
async for _ in llm.astream("Dummy message", {"callbacks": [cb], "run_id": uid2}):
pass
assert cb.traced_run_ids == [uid1, uid2]
uid3 = uuid.uuid4()
await llm.abatch([["Dummy message"]], {"callbacks": [cb], "run_id": uid3})
assert cb.traced_run_ids == [uid1, uid2, uid3]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_async_pass_run_id() do?
test_async_pass_run_id() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py.
Where is test_async_pass_run_id() defined?
test_async_pass_run_id() is defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py at line 336.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free