Home / Function/ bind_tools() — langchain Function Reference

bind_tools() — langchain Function Reference

Architecture documentation for the bind_tools() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  39824881_04ea_819a_1013_55073942bacb["bind_tools()"]
  70048a7c_06ac_54dc_f2cc_70cbfa8bcbc9["_ConfigurableModel"]
  39824881_04ea_819a_1013_55073942bacb -->|defined in| 70048a7c_06ac_54dc_f2cc_70cbfa8bcbc9
  b52e4630_a9ff_cc79_c4f8_5c0914c73656["init_chat_model()"]
  b52e4630_a9ff_cc79_c4f8_5c0914c73656 -->|calls| 39824881_04ea_819a_1013_55073942bacb
  style 39824881_04ea_819a_1013_55073942bacb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chat_models/base.py lines 1035–1040

    def bind_tools(
        self,
        tools: Sequence[dict[str, Any] | type[BaseModel] | Callable | BaseTool],
        **kwargs: Any,
    ) -> Runnable[LanguageModelInput, AIMessage]:
        return self.__getattr__("bind_tools")(tools, **kwargs)

Domain

Subdomains

Called By

Frequently Asked Questions

What does bind_tools() do?
bind_tools() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chat_models/base.py.
Where is bind_tools() defined?
bind_tools() is defined in libs/langchain/langchain_classic/chat_models/base.py at line 1035.
What calls bind_tools()?
bind_tools() is called by 1 function(s): init_chat_model.

Analyze Your Own Codebase

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

Try Supermodel Free