bstraehle commited on
Commit
6bf14de
·
verified ·
1 Parent(s): ca74801

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +22 -14
crew.py CHANGED
@@ -27,16 +27,18 @@ def get_crew():
27
 
28
  research_agent = Agent(
29
  role="Web Research Agent",
30
- goal="Search the web for topic \"{topic}\" and scrape the most relevant web page.",
31
- backstory="As an expert web research assistant, you are searching the web for topic \"{topic}\" and scraping the most relevant web page.",
 
32
  tools=[search_tool, web_rag_tool],
33
  verbose=True
34
  )
35
 
36
  answer_agent = Agent(
37
  role="Final Answer Agent",
38
- goal="Provide the final answer on topic \"{topic}\".",
39
- backstory="As an expert answer assistant, you are providing the final answer on topic \"{topic}\".",
 
40
  tools=[final_answer_tool],
41
  verbose=True
42
  )
@@ -48,16 +50,21 @@ def get_crew():
48
  allow_delegation=True
49
  )
50
 
51
- research = Task(
52
- agent=research_agent,
53
- description="Search the web for topic \"{topic}\" and scrape the most relevant web page.",
54
- expected_output="Content on topic \"{topic}\"."
55
- )
 
 
 
 
 
 
56
 
57
- answer = Task(
58
- agent=answer_agent,
59
- description="Given topic \"{topic}\" and an initial answer, get the final answer.",
60
- expected_output="The final answer to topic \"{topic}\"."
61
  )
62
 
63
  return Crew(
@@ -65,7 +72,8 @@ def get_crew():
65
  manager_agent=manager_agent,
66
  planning=True,
67
  process=Process.hierarchical,
68
- tasks=[research, answer],
 
69
  verbose=True
70
  )
71
 
 
27
 
28
  research_agent = Agent(
29
  role="Web Research Agent",
30
+ goal="Search the web for question \"{topic}\" and scrape the most relevant web page.",
31
+ backstory="As an expert web research assistant, you are searching the web for question \"{topic}\" and scraping the most relevant web page.",
32
+ allow_delegation=False,
33
  tools=[search_tool, web_rag_tool],
34
  verbose=True
35
  )
36
 
37
  answer_agent = Agent(
38
  role="Final Answer Agent",
39
+ goal="Provide the final answer to question \"{topic}\".",
40
+ backstory="As an expert question/answer assistant, you are providing the final answer to question \"{topic}\".",
41
+ allow_delegation=False,
42
  tools=[final_answer_tool],
43
  verbose=True
44
  )
 
50
  allow_delegation=True
51
  )
52
 
53
+ #research = Task(
54
+ # agent=research_agent,
55
+ # description="Search the web for topic \"{topic}\" and scrape the most relevant web page.",
56
+ # expected_output="Content on topic \"{topic}\"."
57
+ #)
58
+
59
+ #answer = Task(
60
+ # agent=answer_agent,
61
+ # description="Given topic \"{topic}\" and an initial answer, get the final answer.",
62
+ # expected_output="The final answer to topic \"{topic}\"."
63
+ #)
64
 
65
+ task = Task(
66
+ description="Find the final answer to question \"{topic}\".",
67
+ expected_output="The final answer to question \"{topic}\"."
 
68
  )
69
 
70
  return Crew(
 
72
  manager_agent=manager_agent,
73
  planning=True,
74
  process=Process.hierarchical,
75
+ #tasks=[research, answer],
76
+ tasks=[task],
77
  verbose=True
78
  )
79