invoke() — langchain Function Reference
Architecture documentation for the invoke() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e2ca1dd3_4ae9_2ab3_37d2_60242857703f["invoke()"] 4a62481c_02cb_a5de_1833_50669d5351a6["Runnable"] e2ca1dd3_4ae9_2ab3_37d2_60242857703f -->|defined in| 4a62481c_02cb_a5de_1833_50669d5351a6 2826dfcf_5024_bd4d_0268_8f909fbbae0c["batch()"] 2826dfcf_5024_bd4d_0268_8f909fbbae0c -->|calls| e2ca1dd3_4ae9_2ab3_37d2_60242857703f 233d5f85_2b64_14ea_50c5_ade4d2be2873["batch_as_completed()"] 233d5f85_2b64_14ea_50c5_ade4d2be2873 -->|calls| e2ca1dd3_4ae9_2ab3_37d2_60242857703f 66bfa0c6_f60c_67bd_cbc1_53b945547106["stream()"] 66bfa0c6_f60c_67bd_cbc1_53b945547106 -->|calls| e2ca1dd3_4ae9_2ab3_37d2_60242857703f style e2ca1dd3_4ae9_2ab3_37d2_60242857703f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 822–842
def invoke(
self,
input: Input,
config: RunnableConfig | None = None,
**kwargs: Any,
) -> Output:
"""Transform a single input into an output.
Args:
input: The input to the `Runnable`.
config: A config to use when invoking the `Runnable`.
The config supports standard keys like `'tags'`, `'metadata'` for
tracing purposes, `'max_concurrency'` for controlling how much work to
do in parallel, and other keys.
Please refer to `RunnableConfig` for more details.
Returns:
The output of the `Runnable`.
"""
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does invoke() do?
invoke() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is invoke() defined?
invoke() is defined in libs/core/langchain_core/runnables/base.py at line 822.
What calls invoke()?
invoke() is called by 3 function(s): batch, batch_as_completed, stream.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free