Home / Function/ awrap_model_call() — langchain Function Reference

awrap_model_call() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  4190581f_3784_063f_53f4_e785f05be8ff["awrap_model_call()"]
  8218c580_67e5_81e4_7473_e7451ecfffe6["AsyncResponseMiddleware"]
  4190581f_3784_063f_53f4_e785f05be8ff -->|defined in| 8218c580_67e5_81e4_7473_e7451ecfffe6
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc["awrap_model_call()"]
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc -->|calls| 4190581f_3784_063f_53f4_e785f05be8ff
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc["awrap_model_call()"]
  4190581f_3784_063f_53f4_e785f05be8ff -->|calls| cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc
  style 4190581f_3784_063f_53f4_e785f05be8ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_typing.py lines 339–347

    async def awrap_model_call(
        self,
        request: ModelRequest[ContextT],
        handler: Callable[[ModelRequest[ContextT]], Awaitable[ModelResponse[AnalysisResult]]],
    ) -> ModelResponse[AnalysisResult]:
        response = await handler(request)
        if response.structured_response is not None:
            _sentiment: str = response.structured_response.sentiment
        return response

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_typing/test_middleware_typing.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_typing.py at line 339.
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