From 72b4a2d94343e34be31b73e7642d9020bf4407b6 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 8 Jul 2023 11:40:56 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20refactor(chat.py):=20remove=20un?= =?UTF-8?q?necessary=20code=20for=20building=20the=20root=20node=20in=20th?= =?UTF-8?q?e=20graph=20The=20code=20for=20building=20the=20root=20node=20i?= =?UTF-8?q?n=20the=20graph=20has=20been=20removed=20as=20it=20is=20no=20lo?= =?UTF-8?q?nger=20necessary.=20Previously,=20the=20root=20node=20was=20bui?= =?UTF-8?q?lt=20separately=20due=20to=20certain=20nodes=20requiring=20para?= =?UTF-8?q?meters=20that=20were=20not=20connected=20to=20it.=20However,=20?= =?UTF-8?q?this=20approach=20has=20been=20reconsidered=20and=20the=20tools?= =?UTF-8?q?=20are=20now=20connected=20to=20the=20ZeroShotPrompt,=20elimina?= =?UTF-8?q?ting=20the=20need=20for=20separate=20building=20of=20the=20root?= =?UTF-8?q?=20node.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/chat.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 164dd2dd5..f6f0eceb1 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -115,13 +115,6 @@ async def stream_build(flow_id: str): number_of_nodes = len(graph.nodes) flow_data_store[flow_id]["status"] = BuildStatus.IN_PROGRESS - # To deal with the ZeroShotAgent case - # we need to build the root node first - # and then the rest of the graph - # This is a big problem because certain nodes require - # params that are not connected to it. - # We should consider connecting the tools to the ZeroShotPrompt - graph.build() for i, vertex in enumerate(graph.generator_build(), 1): try: