mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 02:05:11 +08:00
fix: make sure to keep table outputs when changing provider (#11426)
* fix: make sure to keep table outputs when changing provider * [autofix.ci] apply automated fixes * fix: enable real-time refresh for Else output option in SmartRouterComponent * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -1176,7 +1176,7 @@
|
||||
},
|
||||
"SmartRouter": {
|
||||
"versions": {
|
||||
"0.3.0": "9c6736e784f6"
|
||||
"0.3.0": "2b49dc46dae8"
|
||||
}
|
||||
},
|
||||
"LLMSelectorComponent": {
|
||||
|
||||
@ -117,6 +117,7 @@ class SmartRouterComponent(Component):
|
||||
info="Include an Else output for cases that don't match any route.",
|
||||
value=False,
|
||||
advanced=True,
|
||||
real_time_refresh=True,
|
||||
),
|
||||
MultilineInput(
|
||||
name="custom_prompt",
|
||||
@ -145,7 +146,7 @@ class SmartRouterComponent(Component):
|
||||
|
||||
def update_outputs(self, frontend_node: dict, field_name: str, field_value: Any) -> dict:
|
||||
"""Create a dynamic output for each category in the categories table."""
|
||||
if field_name in {"routes", "enable_else_output"}:
|
||||
if field_name in {"routes", "enable_else_output", "model"}:
|
||||
frontend_node["outputs"] = []
|
||||
|
||||
# Get the routes data - either from field_value (if routes field) or from component state
|
||||
|
||||
Reference in New Issue
Block a user