bstraehle commited on
Commit
de1b991
·
verified ·
1 Parent(s): 686ec52

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +3 -7
crew.py CHANGED
@@ -303,7 +303,7 @@ def run_crew(question, file_path):
303
  backstory="As an expert Python code generation assistant, you generate code to help answer the question.",
304
  allow_delegation=False,
305
  llm=AGENT_MODEL,
306
- max_iter=2,
307
  tools=[code_generation_tool],
308
  verbose=False
309
  )
@@ -314,7 +314,7 @@ def run_crew(question, file_path):
314
  backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
315
  allow_delegation=False,
316
  llm=AGENT_MODEL,
317
- max_iter=2,
318
  tools=[code_execution_tool],
319
  verbose=False
320
  )
@@ -362,12 +362,8 @@ def run_crew(question, file_path):
362
  if df.empty:
363
  question = f"{question} File path: {file_path}."
364
  else:
365
- question = f"{question} File data: {df.to_string()}" # load data due to sandbox contraints
366
 
367
- print("###")
368
- print(question)
369
- print("###")
370
-
371
  initial_answer = crew.kickoff(inputs={"question": question})
372
  final_answer = get_final_answer(FINAL_ANSWER_MODEL, question, str(initial_answer))
373
 
 
303
  backstory="As an expert Python code generation assistant, you generate code to help answer the question.",
304
  allow_delegation=False,
305
  llm=AGENT_MODEL,
306
+ max_iter=5,
307
  tools=[code_generation_tool],
308
  verbose=False
309
  )
 
314
  backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
315
  allow_delegation=False,
316
  llm=AGENT_MODEL,
317
+ max_iter=5,
318
  tools=[code_execution_tool],
319
  verbose=False
320
  )
 
362
  if df.empty:
363
  question = f"{question} File path: {file_path}."
364
  else:
365
+ question = f"{question} File data: {df.to_string()}" # sandbox contraints
366
 
 
 
 
 
367
  initial_answer = crew.kickoff(inputs={"question": question})
368
  final_answer = get_final_answer(FINAL_ANSWER_MODEL, question, str(initial_answer))
369