LangChain · Class
RunnableLambda
RunnableLambda wraps a Python callable as a Runnable. It supports synchronous and asynchronous use, composition, and LangChain tracing.
Last updated
- Since
- v1.7
Syntax
RunnableLambda(self, func: Callable[[Input], Output] | Callable[[Input], Awaitable[Output]] | Callable[[Input], Runnable[Input, Output]] | ...)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
RunnableGeneratorRunnableRunnableConfiginvokeainvokestreamastream