Home / Function/ awrap_model_call() — langchain Function Reference

awrap_model_call() — langchain Function Reference

Architecture documentation for the awrap_model_call() function in test_wrap_model_call_state_update.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  51687d1d_2aa5_1a8f_9622_1f572a1fb956["awrap_model_call()"]
  cb104ce1_a3f1_7f86_c82e_5471d3cb6af8["AsyncAddMiddleware"]
  51687d1d_2aa5_1a8f_9622_1f572a1fb956 -->|defined in| cb104ce1_a3f1_7f86_c82e_5471d3cb6af8
  d883a19b_8d28_0b2c_3234_b7a16a215d77["awrap_model_call()"]
  d883a19b_8d28_0b2c_3234_b7a16a215d77 -->|calls| 51687d1d_2aa5_1a8f_9622_1f572a1fb956
  d883a19b_8d28_0b2c_3234_b7a16a215d77["awrap_model_call()"]
  51687d1d_2aa5_1a8f_9622_1f572a1fb956 -->|calls| d883a19b_8d28_0b2c_3234_b7a16a215d77
  style 51687d1d_2aa5_1a8f_9622_1f572a1fb956 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py lines 257–267

            async def awrap_model_call(
                self,
                request: ModelRequest,
                handler: Callable[[ModelRequest], Awaitable[ModelResponse]],
            ) -> ExtendedModelResponse:
                response = await handler(request)
                custom = HumanMessage(content="Async custom", id="async-custom")
                return ExtendedModelResponse(
                    model_response=response,
                    command=Command(update={"messages": [custom]}),
                )

Domain

Subdomains

Called By

Frequently Asked Questions

What does awrap_model_call() do?
awrap_model_call() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py at line 257.
What does awrap_model_call() call?
awrap_model_call() calls 1 function(s): awrap_model_call.
What calls awrap_model_call()?
awrap_model_call() is called by 1 function(s): awrap_model_call.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free