Update crew.py
Browse files
crew.py
CHANGED
@@ -27,21 +27,21 @@ def get_crew():
|
|
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
|
32 |
allow_delegation=False,
|
33 |
-
tools=[search_tool, web_rag_tool
|
34 |
verbose=True
|
35 |
)
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
#manager_agent = Agent(
|
47 |
# role="Project Manager",
|
@@ -52,15 +52,15 @@ def get_crew():
|
|
52 |
|
53 |
research = Task(
|
54 |
agent=research_agent,
|
55 |
-
description="Search the web for question \"{topic}\" and scrape the most relevant web page.
|
56 |
-
expected_output="
|
57 |
)
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
|
65 |
#task = Task(
|
66 |
# description="Find the final answer to question \"{topic}\".",
|
@@ -68,11 +68,11 @@ def get_crew():
|
|
68 |
#)
|
69 |
|
70 |
return Crew(
|
71 |
-
agents=[research_agent],
|
72 |
#manager_agent=manager_agent,
|
73 |
planning=True,
|
74 |
process=Process.sequential,
|
75 |
-
tasks=[research],
|
76 |
#tasks=[task],
|
77 |
verbose=True
|
78 |
)
|
|
|
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 research assistant, you are searching the web for question \"{topic}\" and scraping the most relevant web page. Your output is input to the Final Answer Agent.",
|
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="Your input is output from the Web Search Agent. 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 |
+
)
|
45 |
|
46 |
#manager_agent = Agent(
|
47 |
# role="Project Manager",
|
|
|
52 |
|
53 |
research = Task(
|
54 |
agent=research_agent,
|
55 |
+
description="Search the web for question \"{topic}\" and scrape the most relevant web page.",
|
56 |
+
expected_output="Content to help answer question \"{topic}\"."
|
57 |
)
|
58 |
|
59 |
+
answer = Task(
|
60 |
+
agent=answer_agent,
|
61 |
+
description="Given question \"{topic}\" and an initial answer, provide the final answer.",
|
62 |
+
expected_output="The final answer to question \"{topic}\"."
|
63 |
+
)
|
64 |
|
65 |
#task = Task(
|
66 |
# description="Find the final answer to question \"{topic}\".",
|
|
|
68 |
#)
|
69 |
|
70 |
return Crew(
|
71 |
+
agents=[research_agent, answer_agent],
|
72 |
#manager_agent=manager_agent,
|
73 |
planning=True,
|
74 |
process=Process.sequential,
|
75 |
+
tasks=[research, answer],
|
76 |
#tasks=[task],
|
77 |
verbose=True
|
78 |
)
|