test_async_callbacks_in_sync() — langchain Function Reference
Architecture documentation for the test_async_callbacks_in_sync() function in test_async_callbacks.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 096891e6_bf19_a959_0ee9_261c6d17bd5c["test_async_callbacks_in_sync()"] 0976f644_8566_afee_cf50_f48330be7127["test_async_callbacks.py"] 096891e6_bf19_a959_0ee9_261c6d17bd5c -->|defined in| 0976f644_8566_afee_cf50_f48330be7127 style 096891e6_bf19_a959_0ee9_261c6d17bd5c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/benchmarks/test_async_callbacks.py lines 48–56
async def test_async_callbacks_in_sync(benchmark: BenchmarkFixture) -> None:
infinite_cycle = cycle([AIMessage(content=" ".join(["hello", "goodbye"] * 5))])
model = GenericFakeChatModel(messages=infinite_cycle)
@benchmark # type: ignore[untyped-decorator]
def sync_callbacks() -> None:
for _ in range(5):
for _ in model.stream("meow", {"callbacks": [MyCustomAsyncHandler()]}):
pass
Domain
Subdomains
Source
Frequently Asked Questions
What does test_async_callbacks_in_sync() do?
test_async_callbacks_in_sync() is a function in the langchain codebase, defined in libs/core/tests/benchmarks/test_async_callbacks.py.
Where is test_async_callbacks_in_sync() defined?
test_async_callbacks_in_sync() is defined in libs/core/tests/benchmarks/test_async_callbacks.py at line 48.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free