_make_wrapped_coroutine() — langchain Function Reference
Architecture documentation for the _make_wrapped_coroutine() function in custom_tool.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 96434308_aeec_dce2_9fb2_a803ae096f07["_make_wrapped_coroutine()"] 2bc1c3fe_4564_705b_4b4f_ef73fdf56b3c["custom_tool.py"] 96434308_aeec_dce2_9fb2_a803ae096f07 -->|defined in| 2bc1c3fe_4564_705b_4b4f_ef73fdf56b3c 36d50a89_56e5_c281_6ef1_1f4a9574ce0a["custom_tool()"] 36d50a89_56e5_c281_6ef1_1f4a9574ce0a -->|calls| 96434308_aeec_dce2_9fb2_a803ae096f07 style 96434308_aeec_dce2_9fb2_a803ae096f07 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/langchain_openai/tools/custom_tool.py lines 17–24
def _make_wrapped_coroutine(
coroutine: Callable[..., Awaitable[str]],
) -> Callable[..., Awaitable[list[dict[str, Any]]]]:
async def wrapped(*args: Any, **kwargs: Any) -> list[dict[str, Any]]:
result = await coroutine(*args, **kwargs)
return [{"type": "custom_tool_call_output", "output": result}]
return wrapped
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _make_wrapped_coroutine() do?
_make_wrapped_coroutine() is a function in the langchain codebase, defined in libs/partners/openai/langchain_openai/tools/custom_tool.py.
Where is _make_wrapped_coroutine() defined?
_make_wrapped_coroutine() is defined in libs/partners/openai/langchain_openai/tools/custom_tool.py at line 17.
What calls _make_wrapped_coroutine()?
_make_wrapped_coroutine() is called by 1 function(s): custom_tool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free