test_async_after_model_decorator() — langchain Function Reference
Architecture documentation for the test_async_after_model_decorator() function in test_decorators.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD dbbbbc55_121d_9eaa_f841_4cf280580fa5["test_async_after_model_decorator()"] 85a104a3_11cf_6539_d0c0_ba69a17a41d4["test_decorators.py"] dbbbbc55_121d_9eaa_f841_4cf280580fa5 -->|defined in| 85a104a3_11cf_6539_d0c0_ba69a17a41d4 5db83528_8e08_d7fe_e2fc_f806b038e621["after_model()"] dbbbbc55_121d_9eaa_f841_4cf280580fa5 -->|calls| 5db83528_8e08_d7fe_e2fc_f806b038e621 style dbbbbc55_121d_9eaa_f841_4cf280580fa5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py lines 289–299
def test_async_after_model_decorator() -> None:
"""Test after_model decorator with async function."""
@after_model(state_schema=CustomState, tools=[test_tool], name="AsyncAfterModel")
async def async_after_model(*_args: Any, **_kwargs: Any) -> dict[str, Any]:
return {"custom_field": "async_value"}
assert isinstance(async_after_model, AgentMiddleware)
assert async_after_model.state_schema == CustomState
assert async_after_model.tools == [test_tool]
assert async_after_model.__class__.__name__ == "AsyncAfterModel"
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_async_after_model_decorator() do?
test_async_after_model_decorator() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py.
Where is test_async_after_model_decorator() defined?
test_async_after_model_decorator() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py at line 289.
What does test_async_after_model_decorator() call?
test_async_after_model_decorator() calls 1 function(s): after_model.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free