diff --git a/src/backend/base/langflow/components/langchain_utilities/csv.py b/src/backend/base/langflow/components/langchain_utilities/csv.py index 0bd4b7e6df0e..3e1e322410d6 100644 --- a/src/backend/base/langflow/components/langchain_utilities/csv.py +++ b/src/backend/base/langflow/components/langchain_utilities/csv.py @@ -3,7 +3,7 @@ from langflow.base.agents.agent import LCAgentComponent from langflow.field_typing import AgentExecutor from langflow.inputs import DropdownInput, FileInput, HandleInput -from langflow.inputs.inputs import MessageTextInput +from langflow.inputs.inputs import DictInput, MessageTextInput from langflow.schema.message import Message from langflow.template.field.base import Output @@ -44,6 +44,13 @@ class CSVAgentComponent(LCAgentComponent): display_name="Text", info="Text to be passed as input and extract info from the CSV File.", ), + DictInput( + name="pandas_kwargs", + display_name="Pandas Kwargs", + info="Pandas Kwargs to be passed to the agent.", + advanced=True, + is_list=True, + ), ] outputs = [ @@ -67,6 +74,7 @@ def build_agent_response(self) -> Message: path=self._path(), agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, + pandas_kwargs=self.pandas_kwargs, **agent_kwargs, ) @@ -84,6 +92,7 @@ def build_agent(self) -> AgentExecutor: path=self._path(), agent_type=self.agent_type, handle_parsing_errors=self.handle_parsing_errors, + pandas_kwargs=self.pandas_kwargs, **agent_kwargs, )