sanjaystarc commited on
Commit
c1a10eb
·
verified ·
1 Parent(s): e7f7ccf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -89,17 +89,17 @@ def main():
89
  # FIX: Ensure include_df_in_prompt is False when using a custom suffix
90
  # This prevents the ValueError: "If suffix is specified, include_df_in_prompt should not be."
91
  agent = create_pandas_dataframe_agent(
92
- llm,
93
- df,
94
- verbose=True,
95
- agent_type="zero-shot-react-description",
96
- allow_dangerous_code=True,
97
- prefix=custom_prefix,
98
- suffix=custom_suffix,
99
- include_df_in_prompt=False, # Explicitly disabled to allow custom suffix
100
- handle_parsing_errors=True,
101
- agent_executor_kwargs={
102
- "handle_parsing_errors": True
103
  }
104
  )
105
 
 
89
  # FIX: Ensure include_df_in_prompt is False when using a custom suffix
90
  # This prevents the ValueError: "If suffix is specified, include_df_in_prompt should not be."
91
  agent = create_pandas_dataframe_agent(
92
+ llm,
93
+ df,
94
+ verbose=True,
95
+ agent_type="zero-shot-react", # <-- FIXED
96
+ allow_dangerous_code=True,
97
+ prefix=custom_prefix,
98
+ suffix=custom_suffix,
99
+ include_df_in_prompt=False, # <-- now allowed
100
+ handle_parsing_errors=True,
101
+ agent_executor_kwargs={
102
+ "handle_parsing_errors": True
103
  }
104
  )
105