return await self._acall_with_config(self._ainvoke, input, config)
[docs]class RunnableBinding(Serializable, Runnable[Input, Output]):
    """
    A runnable that delegates calls to another runnable with a set of kwargs.
    """
    bound: Runnable[Input, Output]
    kwargs: Mapping[str, Any]
    config: Mapping[str, Any] = Field(default_factory=dict)
    class Config:
        arbitrary_types_allowed = True
    @property
    def InputType(self) -> type[Input]:
        return self.bound.InputType
    @property
    def OutputType(self) -> type[Output]:
        return self.bound.OutputType
    @property
    def input_schema(self) -> Type[BaseModel]:
        return self.bound.input_schema
    @property
    def output_schema(self) -> Type[BaseModel]:
        return self.bound.output_schema
[docs]    @classmethod
    def is_lc_serializable(cls) -> bool:
        return True
[docs]    @classmethod
    def get_lc_namespace(cls) -> List[str]:
        return cls.__module__.split(".")[:-1]
    def _merge_config(self, config: Optional[RunnableConfig]) -> RunnableConfig:
        copy = cast(RunnableConfig, dict(self.config))
        if config:
            for key in config:
                if key == "metadata":
                    copy[key] = {**copy.get(key, {}), **config[key]}  # type: ignore
                elif key == "tags":
                    copy[key] = (copy.get(key) or []) + config[key]  # type: ignore
                else:
                    # Even though the keys aren't literals this is correct
                    # because both dicts are same type