Closed Arron-Clague closed 1 month ago
The issue with the "Run Flow," "Flow as Tool," and "Sub Flow" components not displaying flows in the dropdown box for selecting a flow name is likely due to the update_build_config
method not being called or the list_flows
method not returning any flows. The update_build_config
method updates the build_config
with available flow names by calling get_flow_names
, which in turn calls list_flows
to retrieve the flow data.
Here is the relevant code snippet from the FlowToolComponent
class:
class FlowToolComponent(CustomComponent):
# ... other methods and attributes ...
def get_flow_names(self) -> List[str]:
flow_datas = self.list_flows()
return [flow_data.data["name"] for flow_data in flow_datas]
def update_build_config(self, build_config: dotdict, field_value: Any, field_name: str | None = None):
logger.debug(f"Updating build config with field value {field_value} and field name {field_name}")
if field_name == "flow_name":
build_config["flow_name"]["options"] = self.get_flow_names()
return build_config
To resolve this issue, ensure that:
update_build_config
method is being called appropriately.list_flows
method is correctly implemented and returning the available flows.Additionally, the "Flow as Tool," "Run Flow," and "Sub Flow" components have a Flow Name
parameter with options that should list the available flows. These components also support real-time refresh and have a refresh button to update the list of flows. Make sure these features are enabled and functioning correctly to ensure the dropdown box is populated with the available flows [1][2][3].
To continue talking to Dosu, mention @dosu.
Encountering the same issue here too.
Same error here 1.12,
It was resolved in v1.0.13.
Hi @YamonBot it appears not fixed : only the run as flow tool shows items in its dropdown box, and attempting to use the component always produced the error : "Error building Component Run Flow: 'in
Hello!
I will be fixing this issue today.
Thanks!
Bug Description
Run Flow, Flow as Tool, Sub Flow components do not show flows in drop down box for flow name
Reproduction
Place components on canvas attempt to set flow name from dropdown
Expected behavior
Should show flows from collection
Who can help?
@anovazzi1 @Cristhianzl @lucaseduoli
Operating System
Ubuntu Linux 22.04
Langflow Version
1.10 to 1.12 at least
Python Version
3.10
Screenshot
Flow File
No response