Why add this? We view this as a basic building block for constructing chains Just as you could want to run a sequence of chains sequentially, there's also the basic building block of forking and routing to the correct chain What are some of the use cases?
@hwchase17
-
RouterChain Dynamic Prompt Selection with LangChain
By
–
MultiPromptChain This notebook demonstrates how to use the RouterChain paradigm to create a chain that dynamically selects the prompt to use for a given input Basically, route between prompts depending on user input! Docs: https://
python.langchain.com/en/latest/modu
les/chains/examples/multi_prompt_router.html
… -
Router Chains: LangChain Classification for Dynamic Chain Selection
By
–
Router Chains A simple (yet much requested) abstraction that started with a @ShreyaR pr months ago and is finally in @langchain
! – Router Chain does classification to choose sub chain to use
– Call the selected chain with that input Lots of potential use cases! -
Automatic Pydantic Model Construction from Function Signatures
By
–
we inspect the function signature, and use that to construct a pydantic model automatically
-
Pydantic validates tool inputs easily
By
–
pydantic allows us to add validation to tool inputs easily
-
LangChain Introduces New Multi-Input Tool Agent
By
–
However, we also introduced a new agent type that works with tools with multiple inputs This agent is ALSO compatible with older tools, so we would recommend using this by default Docs: https://
python.langchain.com/en/latest/modu
les/agents/agents/examples/structured_chat.html
…