Home / Class/ _VarArgToolWithKwargs Class — langchain Architecture

_VarArgToolWithKwargs Class — langchain Architecture

Architecture documentation for the _VarArgToolWithKwargs class in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  276547e9_36a5_21f7_3316_bff79d50ca6e["_VarArgToolWithKwargs"]
  18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"]
  276547e9_36a5_21f7_3316_bff79d50ca6e -->|extends| 18e85ff8_9a5d_f800_f722_027398dc89e7
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  276547e9_36a5_21f7_3316_bff79d50ca6e -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  243f051d_d43c_4483_2be2_3084c954547b["_run()"]
  276547e9_36a5_21f7_3316_bff79d50ca6e -->|method| 243f051d_d43c_4483_2be2_3084c954547b
  c7ee2987_304e_5ae9_d78f_4d228dc00219["_arun()"]
  276547e9_36a5_21f7_3316_bff79d50ca6e -->|method| c7ee2987_304e_5ae9_d78f_4d228dc00219

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 277–296

    class _VarArgToolWithKwargs(BaseTool):
        name: str = "single_arg_tool"
        description: str = "A single arged tool with kwargs"

        @override
        def _run(
            self,
            *args: Any,
            run_manager: CallbackManagerForToolRun | None = None,
            **kwargs: Any,
        ) -> str:
            return "foo"

        async def _arun(
            self,
            *args: Any,
            run_manager: AsyncCallbackManagerForToolRun | None = None,
            **kwargs: Any,
        ) -> str:
            raise NotImplementedError

Extends

Frequently Asked Questions

What is the _VarArgToolWithKwargs class?
_VarArgToolWithKwargs is a class in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is _VarArgToolWithKwargs defined?
_VarArgToolWithKwargs is defined in libs/core/tests/unit_tests/test_tools.py at line 277.
What does _VarArgToolWithKwargs extend?
_VarArgToolWithKwargs extends BaseTool.

Analyze Your Own Codebase

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

Try Supermodel Free