From 783ccdf37bfcf9fc41fd26b85d038d9e7f10046e Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Fri, 13 Sep 2024 11:24:34 -0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20(CSVAgent.py):=20Fix=20handl?= =?UTF-8?q?e=5Fparsing=5Ferrors=20parameter=20to=20use=20the=20correct=20i?= =?UTF-8?q?nstance=20variable=20self.handle=5Fparsing=5Ferrors=20instead?= =?UTF-8?q?=20of=20a=20hardcoded=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/base/langflow/components/agents/CSVAgent.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/CSVAgent.py index 444a04ae2a5..10b2985d8f7 100644 --- a/src/backend/base/langflow/components/agents/CSVAgent.py +++ b/src/backend/base/langflow/components/agents/CSVAgent.py @@ -56,11 +56,9 @@ def build_agent_response(self) -> Message: } agent_csv = create_csv_agent( - llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=True, **agent_kwargs + llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, **agent_kwargs ) - print(f"self.inputs = {agent_csv}") - result = agent_csv.invoke({"input": self.input_value}) return Message(text=str(result["output"])) @@ -71,9 +69,9 @@ def build_agent(self) -> AgentExecutor: } agent_csv = create_csv_agent( - llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=True, **agent_kwargs + llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, **agent_kwargs ) self.status = Message(text=str(agent_csv)) - return agent_csv + return agent_csv \ No newline at end of file From e81689c71a0572f0547b282ce944724aae73099f Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Fri, 13 Sep 2024 11:25:03 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20(CSVAgent.py):=20add=20newli?= =?UTF-8?q?ne=20at=20the=20end=20of=20the=20file=20to=20follow=20best=20pr?= =?UTF-8?q?actices=20and=20improve=20code=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/base/langflow/components/agents/CSVAgent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/CSVAgent.py index 10b2985d8f7..96e5e0e22c3 100644 --- a/src/backend/base/langflow/components/agents/CSVAgent.py +++ b/src/backend/base/langflow/components/agents/CSVAgent.py @@ -74,4 +74,4 @@ def build_agent(self) -> AgentExecutor: self.status = Message(text=str(agent_csv)) - return agent_csv \ No newline at end of file + return agent_csv From 5d524ec914631927e0a5e19f7f03fef6cc31c646 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:27:42 +0000 Subject: [PATCH 3/3] [autofix.ci] apply automated fixes --- .../base/langflow/components/agents/CSVAgent.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/CSVAgent.py index 96e5e0e22c3..25cec6653d9 100644 --- a/src/backend/base/langflow/components/agents/CSVAgent.py +++ b/src/backend/base/langflow/components/agents/CSVAgent.py @@ -56,7 +56,11 @@ def build_agent_response(self) -> Message: } agent_csv = create_csv_agent( - llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, **agent_kwargs + llm=self.llm, + path=self.path, + agent_type=self.agent_type, + handle_parsing_errors=self.handle_parsing_errors, + **agent_kwargs, ) result = agent_csv.invoke({"input": self.input_value}) @@ -69,7 +73,11 @@ def build_agent(self) -> AgentExecutor: } agent_csv = create_csv_agent( - llm=self.llm, path=self.path, agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, **agent_kwargs + llm=self.llm, + path=self.path, + agent_type=self.agent_type, + handle_parsing_errors=self.handle_parsing_errors, + **agent_kwargs, ) self.status = Message(text=str(agent_csv))