Skip to content

Commit

Permalink
Fix name/description bug in "Flow as Tool".
Browse files Browse the repository at this point in the history
  • Loading branch information
dhlidongming committed Oct 10, 2024
1 parent 4e36dcc commit 160078a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/base/langflow/components/prototypes/FlowTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def build_tool(self) -> Tool:
msg = "Flow name is required"
raise ValueError(msg)
flow_name = self._attributes["flow_name"]
name = self._attributes["name"]
description = self._attributes["description"]
flow_data = self.get_flow(flow_name)
if not flow_data:
msg = "Flow not found."
Expand All @@ -89,8 +91,8 @@ def build_tool(self) -> Tool:
logger.opt(exception=True).warning("Failed to set run_id")
inputs = get_flow_inputs(graph)
tool = FlowTool(
name=self.name,
description=self.description,
name=name,
description=description,
graph=graph,
return_direct=self.return_direct,
inputs=inputs,
Expand Down

0 comments on commit 160078a

Please sign in to comment.