Update crew.py
Browse files
crew.py
CHANGED
@@ -24,22 +24,22 @@ def get_crew():
|
|
24 |
|
25 |
researcher = Agent(
|
26 |
role="Web Research Agent",
|
27 |
-
goal="Search the web for
|
28 |
-
backstory="As an expert web research assistant, you are search the web for
|
29 |
tools=[search_tool, web_rag_tool],
|
30 |
verbose=True
|
31 |
)
|
32 |
|
33 |
research = Task(
|
34 |
agent=researcher,
|
35 |
-
description="Search the web for
|
36 |
-
expected_output="Content on topic {
|
37 |
)
|
38 |
|
39 |
final_answer = Task(
|
40 |
agent=researcher,
|
41 |
-
description="Given
|
42 |
-
expected_output="The final answer to
|
43 |
)
|
44 |
|
45 |
return Crew(
|
@@ -52,7 +52,7 @@ def get_crew():
|
|
52 |
|
53 |
@tool("Final answer tool")
|
54 |
def final_answer_tool(question: str, answer: str) -> str:
|
55 |
-
"""
|
56 |
prompt_template = """
|
57 |
You are given a question and context. You must **precisely** answer the question based on the context. Do not include explanations, steps, reasoning, or additional text.
|
58 |
**Question:** """ + question + """
|
|
|
24 |
|
25 |
researcher = Agent(
|
26 |
role="Web Research Agent",
|
27 |
+
goal="Search the web for topic {topic} and scrape the most relevant web page.",
|
28 |
+
backstory="As an expert web research assistant, you are search the web for topic {topic} and scraping the most relevant web page.",
|
29 |
tools=[search_tool, web_rag_tool],
|
30 |
verbose=True
|
31 |
)
|
32 |
|
33 |
research = Task(
|
34 |
agent=researcher,
|
35 |
+
description="Search the web for topic {topic} and scrape the most relevant web page.",
|
36 |
+
expected_output="Content on topic {topic}."
|
37 |
)
|
38 |
|
39 |
final_answer = Task(
|
40 |
agent=researcher,
|
41 |
+
description="Given topic {topic} and an initial answer, get the final answer.",
|
42 |
+
expected_output="The final answer to topic {topic}."
|
43 |
)
|
44 |
|
45 |
return Crew(
|
|
|
52 |
|
53 |
@tool("Final answer tool")
|
54 |
def final_answer_tool(question: str, answer: str) -> str:
|
55 |
+
"""Given a question and initial answer, get the final answer."""
|
56 |
prompt_template = """
|
57 |
You are given a question and context. You must **precisely** answer the question based on the context. Do not include explanations, steps, reasoning, or additional text.
|
58 |
**Question:** """ + question + """
|