Home / Function/ dummy_tool() — langchain Function Reference

dummy_tool() — langchain Function Reference

Architecture documentation for the dummy_tool() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3c19d9a8_f89c_40d4_7e30_34842588e4a5["dummy_tool()"]
  18428dc5_a41b_90c6_88ad_615296ee3311["test_chat_models.py"]
  3c19d9a8_f89c_40d4_7e30_34842588e4a5 -->|defined in| 18428dc5_a41b_90c6_88ad_615296ee3311
  05e045f5_e702_2ed9_475e_a0d34f7c368b["_run()"]
  3c19d9a8_f89c_40d4_7e30_34842588e4a5 -->|calls| 05e045f5_e702_2ed9_475e_a0d34f7c368b
  style 3c19d9a8_f89c_40d4_7e30_34842588e4a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/test_chat_models.py lines 447–460

def dummy_tool() -> BaseTool:
    class Schema(BaseModel):
        arg1: int = Field(..., description="foo")
        arg2: Literal["bar", "baz"] = Field(..., description="one of 'bar', 'baz'")

    class DummyFunction(BaseTool):  # type: ignore[override]
        args_schema: type[BaseModel] = Schema
        name: str = "dummy_function"
        description: str = "Dummy function."

        def _run(self, *args: Any, **kwargs: Any) -> Any:
            pass

    return DummyFunction()

Domain

Subdomains

Calls

Frequently Asked Questions

What does dummy_tool() do?
dummy_tool() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py.
Where is dummy_tool() defined?
dummy_tool() is defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py at line 447.
What does dummy_tool() call?
dummy_tool() calls 1 function(s): _run.

Analyze Your Own Codebase

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

Try Supermodel Free