The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Add error for batch of 0
Nuno Camposdb4b256a2811
diff --git a/libs/langchain/langchain/schema/runnable/base.py b/libs/langchain/langchain/schema/runnable/base.pyindex 9f5ae53ede..d660132767 100644--- a/libs/langchain/langchain/schema/runnable/base.py+++ b/libs/langchain/langchain/schema/runnable/base.py@@ -238,6 +238,8 @@ class Runnable(Generic[Input, Output], ABC):Helper method to get a list of configs from a single config or a list ofconfigs, useful for subclasses overriding batch() or abatch()."""+ if length < 1:+ raise ValueError(f"length must be >= 1, but got {length}")if isinstance(config, list) and len(config) != length:raise ValueError(f"config must be a list of the same length as inputs, "