This commit is contained in:
Nuno Campos 2023-09-01 15:03:48 +01:00
parent 897f791940
commit fc42726ea0

View File

@ -1575,15 +1575,15 @@ class RunnableBinding(Serializable, Runnable[Input, Output]):
config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None,
**kwargs: Optional[Any], **kwargs: Optional[Any],
) -> List[Output]: ) -> List[Output]:
configs = cast( if isinstance(config, list):
List[RunnableConfig], configs = cast(
[self._merge_config(conf) for conf in config] List[RunnableConfig], [self._merge_config(conf) for conf in config]
if isinstance(config, list) )
else [ else:
configs = [
patch_config(self._merge_config(config), deep_copy_locals=True) patch_config(self._merge_config(config), deep_copy_locals=True)
for _ in range(len(inputs)) for _ in range(len(inputs))
], ]
)
return self.bound.batch(inputs, configs, **{**self.kwargs, **kwargs}) return self.bound.batch(inputs, configs, **{**self.kwargs, **kwargs})
async def abatch( async def abatch(