Home / Function/ bind() — langchain Function Reference

bind() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  65d78490_cc2d_e086_e4c4_bcee7b7af69f["bind()"]
  1ad7446c_5ef5_eeb3_2fc5_22a110a58b17["RunnableBinding"]
  65d78490_cc2d_e086_e4c4_bcee7b7af69f -->|defined in| 1ad7446c_5ef5_eeb3_2fc5_22a110a58b17
  00bd9223_b529_b9b6_8840_dfaa74cdb507["bind()"]
  65d78490_cc2d_e086_e4c4_bcee7b7af69f -->|calls| 00bd9223_b529_b9b6_8840_dfaa74cdb507
  style 65d78490_cc2d_e086_e4c4_bcee7b7af69f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/base.py lines 5985–6003

    def bind(self, **kwargs: Any) -> Runnable[Input, Output]:
        """Bind additional kwargs to a `Runnable`, returning a new `Runnable`.

        Args:
            **kwargs: The kwargs to bind to the `Runnable`.

        Returns:
            A new `Runnable` with the same type and config as the original,
            but with the additional kwargs bound.

        """
        return self.__class__(
            bound=self.bound,
            config=self.config,
            config_factories=self.config_factories,
            kwargs={**self.kwargs, **kwargs},
            custom_input_type=self.custom_input_type,
            custom_output_type=self.custom_output_type,
        )

Domain

Subdomains

Calls

Frequently Asked Questions

What does bind() do?
bind() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is bind() defined?
bind() is defined in libs/core/langchain_core/runnables/base.py at line 5985.
What does bind() call?
bind() calls 1 function(s): bind.

Analyze Your Own Codebase

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

Try Supermodel Free