batch() — langchain Function Reference
Architecture documentation for the batch() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6623b4f5_0477_1322_996c_6a66715eb7c1["batch()"] 9a777f9f_fc96_a4c7_ebd5_632b655b53ae["RunnableBindingBase"] 6623b4f5_0477_1322_996c_6a66715eb7c1 -->|defined in| 9a777f9f_fc96_a4c7_ebd5_632b655b53ae 2826dfcf_5024_bd4d_0268_8f909fbbae0c["batch()"] 2826dfcf_5024_bd4d_0268_8f909fbbae0c -->|calls| 6623b4f5_0477_1322_996c_6a66715eb7c1 ff1cc135_559f_c237_6539_8d8ba268c8e8["_merge_configs()"] 6623b4f5_0477_1322_996c_6a66715eb7c1 -->|calls| ff1cc135_559f_c237_6539_8d8ba268c8e8 2826dfcf_5024_bd4d_0268_8f909fbbae0c["batch()"] 6623b4f5_0477_1322_996c_6a66715eb7c1 -->|calls| 2826dfcf_5024_bd4d_0268_8f909fbbae0c style 6623b4f5_0477_1322_996c_6a66715eb7c1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 5715–5735
def batch(
self,
inputs: list[Input],
config: RunnableConfig | list[RunnableConfig] | None = None,
*,
return_exceptions: bool = False,
**kwargs: Any | None,
) -> list[Output]:
if isinstance(config, list):
configs = cast(
"list[RunnableConfig]",
[self._merge_configs(conf) for conf in config],
)
else:
configs = [self._merge_configs(config) for _ in range(len(inputs))]
return self.bound.batch(
inputs,
configs,
return_exceptions=return_exceptions,
**{**self.kwargs, **kwargs},
)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does batch() do?
batch() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is batch() defined?
batch() is defined in libs/core/langchain_core/runnables/base.py at line 5715.
What does batch() call?
batch() calls 2 function(s): _merge_configs, batch.
What calls batch()?
batch() is called by 1 function(s): batch.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free