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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -86,7 +86,8 @@ def main():
86
  """
87
 
88
  # Create the Pandas Agent
89
- # FIX: Set include_df_in_prompt=False to allow the use of a custom suffix
 
90
  agent = create_pandas_dataframe_agent(
91
  llm,
92
  df,
@@ -95,7 +96,7 @@ def main():
95
  allow_dangerous_code=True,
96
  prefix=custom_prefix,
97
  suffix=custom_suffix,
98
- include_df_in_prompt=False, # Mandatory when using custom suffix
99
  handle_parsing_errors=True,
100
  agent_executor_kwargs={
101
  "handle_parsing_errors": True
 
86
  """
87
 
88
  # Create the Pandas Agent
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,
 
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