param config: RunnableConfig [Optional]¶
The config to bind to the underlying runnable.
param config_factories: List[Callable[[RunnableConfig], RunnableConfig]] [Optional]¶
The config factories to bind to the underlying runnable.
param custom_input_type: Optional[Any] = None¶
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]).
param custom_output_type: Optional[Any] = None¶
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]).
param get_session_history: GetSessionHistoryCallable [Required]¶
param history_factory_config: Sequence[ConfigurableFieldSpec] [Required]¶
param history_messages_key: Optional[str] = None¶
param input_messages_key: Optional[str] = None¶
param kwargs: Mapping[str, Any] [Optional]¶
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.
param output_messages_key: Optional[str] = None¶
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.