Flow as Tool 找不到其他流程
Bug Description
First, create a normal dialog flow to save
A new process is created, and the process created in the first step cannot be found using flow as tool
Reproduction
Expected behavior
A new process is created, and the process created in the first step cannot be found using flow as tool
Who can help?
No response
Operating System
windows
Langflow Version
1.0.13
Python Version
3.11
Screenshot
No response
Flow File
No response
The issue you're encountering where the process created in the first step cannot be found using "flow as tool" after creating a new process is likely due to the list_flows method not being updated with the newly created process. The get_flow_names method retrieves the list of flows from list_flows, and if list_flows does not include the new process, it won't appear in the options.
Here is the relevant code snippet:
def get_flow_names(self) -> List[str]:
flow_datas = self.list_flows()
return [flow_data.data["name"] for flow_data in flow_datas]
Additionally, the build_config method includes a real_time_refresh option for the flow_name field, which should ensure that the list of flow names is updated in real-time. However, if list_flows is not correctly fetching the latest flows, the new process will still not appear.
def build_config(self):
return {
"flow_name": {
"display_name": "Flow Name",
"info": "The name of the flow to run.",
"options": [],
"real_time_refresh": True,
"refresh_button: True,
},
"name": {
"display_name": "Name",
"description": "The name of the tool.",
},
"description": {
"display_name": "Description",
"description": "The description of the tool.",
},
"return_direct": {
"display_name": "Return Direct",
"description": "Return the result directly from the Tool.",
"advanced": True,
},
}
}
To address this, ensure that the list_flows method is correctly fetching the latest flows from the database. You might also want to check if there are any caching mechanisms in place that could be preventing the list_flows method from retrieving the most recent flows [1][2].
To continue talking to Dosu, mention @dosu.
Hello!
I'm sorry to hear about the problem you're having! I'm closing this issue because there is an existing issue that is more generic, but you can follow the progress of the issue #2972 to be notified when your problem gets resolved.
Thanks!