Compare commits

...

1 Commits

Author SHA1 Message Date
William Fu-Hinthorn
19e3f60e59 [RFC] accept with_config(name=...) 2024-07-28 08:53:09 -07:00

View File

@@ -1390,11 +1390,15 @@ class Runnable(Generic[Input, Output], ABC):
Returns:
A new Runnable with the config bound.
"""
config_ = {**(config or {}), **kwargs}
if "name" in config_ and "run_name" not in config_:
config_["run_name"] = config_["name"]
return RunnableBinding(
bound=self,
config=cast(
RunnableConfig,
{**(config or {}), **kwargs},
config_,
), # type: ignore[misc]
kwargs={},
)