langflow
langflow copied to clipboard
feat: Add MultiConditionalRouterComponent for Enhanced Message Routing
This pull request introduces the MultiConditionalRouterComponent
, which enhances the existing ConditionalRouterComponent
by allowing for the evaluation of multiple conditions against a single input message.
Differences from ConditionalRouterComponent:
-
Multiple Case Handling: The
MultiConditionalRouterComponent
supports up to three distinct cases for comparison, enabling more complex routing logic. -
Dedicated Response Methods: Each case has its own response method (
case_1_response
,case_2_response
,case_3_response
), allowing for tailored handling of each case's logic. -
Default Response Logic: A
default_response
method is included to manage scenarios where none of the cases match, providing a fallback option.