bstraehle commited on
Commit
e2e0fe5
Β·
verified Β·
1 Parent(s): 0580b57

Update agents/crew.py

Browse files
Files changed (1) hide show
  1. agents/crew.py +2 -7
agents/crew.py CHANGED
@@ -197,13 +197,13 @@ class GAIACrew():
197
  )
198
 
199
  @agent
200
- def code_generation_agent(self) -> Agent:
201
  return Agent(
202
  config=self.agents_config["code_generation_agent"],
203
  allow_delegation=False,
204
  llm=LLM_AGENT,
205
  max_iter=MAX_ITER_AGENT,
206
- tools=[AITools.code_generation_tool],
207
  reasoning=REASONING_AGENT,
208
  max_reasoning_attempts=MAX_REASONING_ATTEMPTS_AGENT,
209
  verbose=VERBOSE_AGENT
@@ -272,16 +272,11 @@ def run_crew(question, file_path):
272
  final_question = _get_final_question(question, file_path)
273
 
274
  print(f"πŸ€– Question: {question}")
275
- #print(f"πŸ€– Final question: {final_question}")
276
 
277
  print(f"πŸ€– Crew execution started")
278
  answer = GAIACrew().crew().kickoff(inputs={"question": final_question})
279
  print(f"πŸ€– Crew execution completed")
280
 
281
- #final_answer = AITools.get_final_answer(question, str(answer))
282
- #final_answer = answer
283
-
284
- #print(f"πŸ€– Initial answer: {answer}")
285
  print(f"πŸ€– Answer: {answer}")
286
 
287
  return answer
 
197
  )
198
 
199
  @agent
200
+ def code_generation_and_execution_agent(self) -> Agent:
201
  return Agent(
202
  config=self.agents_config["code_generation_agent"],
203
  allow_delegation=False,
204
  llm=LLM_AGENT,
205
  max_iter=MAX_ITER_AGENT,
206
+ tools=[AITools.code_generation_and_execution_tool],
207
  reasoning=REASONING_AGENT,
208
  max_reasoning_attempts=MAX_REASONING_ATTEMPTS_AGENT,
209
  verbose=VERBOSE_AGENT
 
272
  final_question = _get_final_question(question, file_path)
273
 
274
  print(f"πŸ€– Question: {question}")
 
275
 
276
  print(f"πŸ€– Crew execution started")
277
  answer = GAIACrew().crew().kickoff(inputs={"question": final_question})
278
  print(f"πŸ€– Crew execution completed")
279
 
 
 
 
 
280
  print(f"πŸ€– Answer: {answer}")
281
 
282
  return answer