Skip to content

Commit

Permalink
fix: remove log from csvAgent component (langflow-ai#3800)
Browse files Browse the repository at this point in the history
* 🐛 (CSVAgent.py): Fix handle_parsing_errors parameter to use the correct instance variable self.handle_parsing_errors instead of a hardcoded value

* 📝 (CSVAgent.py): add newline at the end of the file to follow best practices and improve code readability
  • Loading branch information
Cristhianzl authored and smatiolids committed Sep 16, 2024
1 parent 58a7737 commit 29dd3bf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/backend/base/langflow/components/agents/CSVAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ 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"]))

Expand All @@ -71,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=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))
Expand Down

0 comments on commit 29dd3bf

Please sign in to comment.