Spaces:
Sleeping
Sleeping
Update tasks.py
Browse files
tasks.py
CHANGED
@@ -2,23 +2,23 @@ from crewai import Task
|
|
2 |
|
3 |
from agents import get_researcher_agent, get_writer_agent
|
4 |
|
5 |
-
def get_research_task(model, temperature, verbose):
|
6 |
return Task(
|
7 |
description=(
|
8 |
-
"1. Search the web for content on topic
|
9 |
"2. Scrape the 10 most relevant web sites for content."
|
10 |
),
|
11 |
expected_output="Content on topic: {topic}.",
|
12 |
-
agent=get_researcher_agent(model, temperature, verbose),
|
13 |
)
|
14 |
|
15 |
-
def get_write_task(model, temperature, verbose):
|
16 |
return Task(
|
17 |
description=(
|
18 |
-
"1. Use the context to write a
|
19 |
-
"2. At the beginning of the
|
20 |
-
"3. At the end of the
|
21 |
),
|
22 |
expected_output="An article on topic {topic}.",
|
23 |
-
agent=get_writer_agent(model, temperature, verbose),
|
24 |
)
|
|
|
2 |
|
3 |
from agents import get_researcher_agent, get_writer_agent
|
4 |
|
5 |
+
def get_research_task(model, max_tokens, temperature, verbose):
|
6 |
return Task(
|
7 |
description=(
|
8 |
+
"1. Search the web for content on topic '{topic}', prioritizing academic papers.\n"
|
9 |
"2. Scrape the 10 most relevant web sites for content."
|
10 |
),
|
11 |
expected_output="Content on topic: {topic}.",
|
12 |
+
agent=get_researcher_agent(model, max_tokens, temperature, verbose),
|
13 |
)
|
14 |
|
15 |
+
def get_write_task(model, max_tokens, temperature, verbose):
|
16 |
return Task(
|
17 |
description=(
|
18 |
+
"1. Use the context to write a 5000-word detailed paper on topic '{topic}' in markdown format. Omit the triple backticks.\n"
|
19 |
+
"2. At the beginning of the paper, add current date and author: Multi-Agent AI System.\n"
|
20 |
+
"3. At the end of the paper, add a references section with links to the academic papers."
|
21 |
),
|
22 |
expected_output="An article on topic {topic}.",
|
23 |
+
agent=get_writer_agent(model, max_tokens, temperature, verbose),
|
24 |
)
|