fix: remove log from csvAgent component (#3800)

* 🐛 (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
This commit is contained in:
Cristhian Zanforlin Lousa 2024-09-13 11:43:55 -03:00 committed by GitHub
commit 612dc7f5ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,11 +56,13 @@ class CSVAgentComponent(LCAgentComponent):
}
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,7 +73,11 @@ class CSVAgentComponent(LCAgentComponent):
}
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))