Concept
RunnableLambda
RunnableLambda is a core component in LangChain Expression Language (LCEL) used to wrap arbitrary Python functions or callable objects into objects that conform to the Runnable interface protocol. Wrapped functions can be composed in chains with other LCEL components—such as chains, prompts, and models—via pipe operators, supporting both synchronous and asynchronous invocation modes and automatically integrating streaming output, batch processing, and callback tracing. It is the primary means of incorporating custom processing logic into LangChain workflows.
All Facts (1)
Source Articles
Getting Started with LangChain in Practice: From Message Templates to RAG PipelinesOct 12
LangChain LCEL表达式语言详解:管道操作符、RunnableLambda与并行执行实战May 22