Configure alternatives for Runnable objects that can be set at runtime.
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.
Assigns new fields to the dict output of this Runnable.
Stream all output from a Runnable, as reported to the callback system.
Bind arguments to a Runnable, returning a new Runnable.
Bind config 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.
Return a new Runnable that maps a list of inputs to a list of outputs.
Add fallbacks to a Runnable, returning a new Runnable.
Create a BaseTool from a Runnable.
| Name | Type | Description |
|---|---|---|
bound* | Runnable[Input, Output] | The underlying |
kwargs | Mapping[str, Any] | None | Default: None |
config | RunnableConfig | None | Default: None |
config_factories | list[Callable[[RunnableConfig], RunnableConfig]] | None | Default: None |
custom_input_type | type[Input] | BaseModel | None | Default: None |
custom_output_type | type[Output] | BaseModel | None | Default: None |
**other_kwargs | Any | Default: {} |
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.
optional kwargs to pass to the underlying Runnable, when running
the underlying Runnable (e.g., via invoke, batch,
transform, or stream or async variants)
optional config to bind to the underlying Runnable.
optional list of config factories to apply to the
config before binding to the underlying Runnable.
Specify to override the input type of the underlying
Runnable with a custom type.
Specify to override the output type of the underlying
Runnable with a custom type.
Unpacked into the base class.