Home / Function/ invoke() — langchain Function Reference

invoke() — langchain Function Reference

Architecture documentation for the invoke() function in passthrough.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  41a5c6ff_cc20_776f_8f5e_75781ad046f8["invoke()"]
  915f0e72_2130_6a8d_6929_3a7528446033["RunnablePassthrough"]
  41a5c6ff_cc20_776f_8f5e_75781ad046f8 -->|defined in| 915f0e72_2130_6a8d_6929_3a7528446033
  2f3554c2_6687_e1b6_f023_84b0e33b81ed["invoke()"]
  2f3554c2_6687_e1b6_f023_84b0e33b81ed -->|calls| 41a5c6ff_cc20_776f_8f5e_75781ad046f8
  2f3554c2_6687_e1b6_f023_84b0e33b81ed["invoke()"]
  41a5c6ff_cc20_776f_8f5e_75781ad046f8 -->|calls| 2f3554c2_6687_e1b6_f023_84b0e33b81ed
  style 41a5c6ff_cc20_776f_8f5e_75781ad046f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/passthrough.py lines 226–233

    def invoke(
        self, input: Other, config: RunnableConfig | None = None, **kwargs: Any
    ) -> Other:
        if self.func is not None:
            call_func_with_variable_args(
                self.func, input, ensure_config(config), **kwargs
            )
        return self._call_with_config(identity, input, config)

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does invoke() do?
invoke() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/passthrough.py.
Where is invoke() defined?
invoke() is defined in libs/core/langchain_core/runnables/passthrough.py at line 226.
What does invoke() call?
invoke() calls 1 function(s): invoke.
What calls invoke()?
invoke() is called by 1 function(s): invoke.

Analyze Your Own Codebase

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

Try Supermodel Free