File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
langchain/agents/agent_toolkits/pandas Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ def create_pandas_dataframe_agent(
1818 suffix : str = SUFFIX ,
1919 input_variables : Optional [List [str ]] = None ,
2020 verbose : bool = False ,
21+ return_intermediate_steps : bool = False ,
22+ max_iterations : Optional [int ] = 15 ,
23+ early_stopping_method : str = "force" ,
2124 ** kwargs : Any ,
2225) -> AgentExecutor :
2326 """Construct a pandas agent from an LLM and dataframe."""
@@ -39,4 +42,11 @@ def create_pandas_dataframe_agent(
3942 )
4043 tool_names = [tool .name for tool in tools ]
4144 agent = ZeroShotAgent (llm_chain = llm_chain , allowed_tools = tool_names , ** kwargs )
42- return AgentExecutor .from_agent_and_tools (agent = agent , tools = tools , verbose = verbose )
45+ return AgentExecutor .from_agent_and_tools (
46+ agent = agent ,
47+ tools = tools ,
48+ verbose = verbose ,
49+ return_intermediate_steps = return_intermediate_steps ,
50+ max_iterations = max_iterations ,
51+ early_stopping_method = early_stopping_method ,
52+ )
You canβt perform that action at this time.
0 commit comments