runnables library

Contains core abstractions related to runnables.

Classes

Runnable<RunInput extends Object?, CallOptions extends RunnableOptions, RunOutput extends Object?>
A Runnable is a generic unit of work that can be invoked, batched, streamed, and/or transformed. It is the basic building block of the LangChain Expression Language (LCEL).
RunnableBinding<RunInput extends Object?, CallOptions extends RunnableOptions, RunOutput extends Object?>
A RunnableBinding allows you to run a Runnable object with CallOptions.
RunnableFunction<RunInput extends Object, RunOutput extends Object>
A RunnableFunction allows you to run a Dart function as part of a chain.
RunnableMap<RunInput extends Object>
A RunnableMap allows you to run multiple Runnable objects in parallel on the same input returning a map of the results.
RunnableMapInput<RunInput extends Object, RunOutput extends Object>
A RunnableMapInput allows you to map the input to a different value.
RunnableMapInputStream<RunInput extends Object, RunOutput extends Object>
A RunnableMapInputStream allows you to map the input stream to a different stream of values.
RunnableOptions
Options to pass into a runnable.
RunnablePassthrough<RunInput extends Object>
A RunnablePassthrough takes the input it receives and passes it through as output.
RunnableRouter<RunInput extends Object, RunOutput extends Object>
A RunnableRouter takes the input it receives and routes it to the runnable returned by the router function.
RunnableSequence<RunInput extends Object?, RunOutput extends Object?>
A RunnableSequence allows you to run multiple Runnable objects sequentially, passing the output of the previous Runnable to the next one.
RunnableWithFallback<RunInput extends Object?, RunOutput extends Object?>
A Runnable that can fallback to other Runnables if it fails.

Extensions

RunnableX on Runnable<RunInput, CallOptions, RunOutput>
Extension methods for Runnables.