Runnable that delegates calls to another Runnable with a set of **kwargs.
Use only if creating a new RunnableBinding subclass with different __init__
args.
See documentation for RunnableBinding for more details.
RunnableBindingBase(
self,
*,
bound: Runnable[Input, Output],
kwargs: Mapping[str, Any] | None = None,
config: RunnableConfig | None = None,
config_factories: list[Callable[[RunnableConfig], RunnableConfig]] | None = None,
custom_input_type: type[Input] | BaseModel | None = None,
custom_output_type: type[Output] | BaseModel | None = None,
**other_kwargs: Any = {}
)| Name | Type | Description |
|---|---|---|
bound* | Runnable[Input, Output] | The underlying |
kwargs | Mapping[str, Any] | None | Default: Noneoptional kwargs to pass to the underlying |
config | RunnableConfig | None | Default: Noneoptional config to bind to the underlying |
config_factories | list[Callable[[RunnableConfig], RunnableConfig]] | None | Default: Noneoptional list of config factories to apply to the
config before binding to the underlying |
custom_input_type | type[Input] | BaseModel | None | Default: NoneSpecify to override the input type of the underlying
|
custom_output_type | type[Output] | BaseModel | None | Default: NoneSpecify to override the output type of the underlying
|
**other_kwargs | Any | Default: {}Unpacked into the base class. |
The underlying Runnable that this Runnable delegates to.
kwargs to pass to the underlying Runnable when running.
For example, when the Runnable binding is invoked the underlying
Runnable will be invoked with the same input but with these additional
kwargs.
The config to bind to the underlying Runnable.
The config factories to bind to the underlying Runnable.
Override the input type of the underlying Runnable with a custom type.
The type can be a Pydantic model, or a type annotation (e.g., list[str]).
Override the output type of the underlying Runnable with a custom type.
The type can be a Pydantic model, or a type annotation (e.g., list[str]).
Return True as this class is serializable.
Get the namespace of the LangChain object.
Get a JSON schema that represents the input to the Runnable.
Get a JSON schema that represents the output of the Runnable.
The type of config this Runnable accepts specified as a Pydantic model.
Get a JSON schema that represents the config of the Runnable.
Return a list of prompts used by this Runnable.
Pipe Runnable objects.
Pick keys from the output dict of this Runnable.
Merge the Dict input with the output produced by the mapping argument.
Stream all output from a Runnable, as reported to the callback system.
Bind arguments to a Runnable, returning a new Runnable.
Bind lifecycle listeners to a Runnable, returning a new Runnable.
Bind async lifecycle listeners to a Runnable.
Bind input and output types to a Runnable, returning a new Runnable.
Create a new Runnable that retries the original Runnable on exceptions.
Map a function to multiple iterables.
Add fallbacks to a Runnable, returning a new Runnable.
Create a BaseTool from a Runnable.