Update agents/crew.py
Browse files- agents/crew.py +2 -7
agents/crew.py
CHANGED
|
@@ -197,13 +197,13 @@ class GAIACrew():
|
|
| 197 |
)
|
| 198 |
|
| 199 |
@agent
|
| 200 |
-
def
|
| 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.
|
| 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
|