Home / Function/ _make_wrapped_func() — langchain Function Reference

_make_wrapped_func() — langchain Function Reference

Architecture documentation for the _make_wrapped_func() function in custom_tool.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f0fb9f2e_4f8a_b540_b097_0a1c095ba3a2["_make_wrapped_func()"]
  2bc1c3fe_4564_705b_4b4f_ef73fdf56b3c["custom_tool.py"]
  f0fb9f2e_4f8a_b540_b097_0a1c095ba3a2 -->|defined in| 2bc1c3fe_4564_705b_4b4f_ef73fdf56b3c
  36d50a89_56e5_c281_6ef1_1f4a9574ce0a["custom_tool()"]
  36d50a89_56e5_c281_6ef1_1f4a9574ce0a -->|calls| f0fb9f2e_4f8a_b540_b097_0a1c095ba3a2
  style f0fb9f2e_4f8a_b540_b097_0a1c095ba3a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/langchain_openai/tools/custom_tool.py lines 10–14

def _make_wrapped_func(func: Callable[..., str]) -> Callable[..., list[dict[str, Any]]]:
    def wrapped(x: str) -> list[dict[str, Any]]:
        return [{"type": "custom_tool_call_output", "output": func(x)}]

    return wrapped

Domain

Subdomains

Called By

Frequently Asked Questions

What does _make_wrapped_func() do?
_make_wrapped_func() is a function in the langchain codebase, defined in libs/partners/openai/langchain_openai/tools/custom_tool.py.
Where is _make_wrapped_func() defined?
_make_wrapped_func() is defined in libs/partners/openai/langchain_openai/tools/custom_tool.py at line 10.
What calls _make_wrapped_func()?
_make_wrapped_func() 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