fix: name/description bug in "Flow as Tool" (#4097)

Fix name/description bug in "Flow as Tool".
This commit is contained in:
dhlidongming 2024-10-14 20:52:26 +08:00 • committed by GitHub
commit ba3bd8a8f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,12 +51,12 @@ class FlowToolComponent(LCToolComponent):
name="flow_name", display_name="Flow Name", info="The name of the flow to run.", refresh_button=True name="flow_name", display_name="Flow Name", info="The name of the flow to run.", refresh_button=True
), ),
StrInput( StrInput(
name="name", name="tool_name",
display_name="Name", display_name="Name",
info="The name of the tool.", info="The name of the tool.",
), ),
StrInput( StrInput(
name="description", name="tool_description",
display_name="Description", display_name="Description",
info="The description of the tool.", info="The description of the tool.",
), ),
@ -89,8 +89,8 @@ class FlowToolComponent(LCToolComponent):
logger.opt(exception=True).warning("Failed to set run_id") logger.opt(exception=True).warning("Failed to set run_id")
inputs = get_flow_inputs(graph) inputs = get_flow_inputs(graph)
tool = FlowTool( tool = FlowTool(
name=self.name, name=self.tool_name,
description=self.description, description=self.tool_description,
graph=graph, graph=graph,
return_direct=self.return_direct, return_direct=self.return_direct,
inputs=inputs, inputs=inputs,