Spaces:
Running
Running
Update tasks.py
Browse files
tasks.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from crewai import Task
|
2 |
|
3 |
-
from agents import get_researcher_agent, get_author_agent
|
4 |
|
5 |
def get_research_task(model, verbose):
|
6 |
return Task(
|
@@ -15,12 +15,22 @@ def get_research_task(model, verbose):
|
|
15 |
def get_author_task(model, verbose):
|
16 |
return Task(
|
17 |
description=(
|
18 |
-
"1. Use the
|
19 |
-
"2. The output must be in markdown format (omit the triple backticks)
|
20 |
-
"3. At the beginning of the article
|
21 |
-
"4. At the end of the article, add a references section with
|
22 |
-
"5. Include inline references
|
23 |
),
|
24 |
expected_output="An article on topic {topic}.",
|
25 |
agent=get_author_agent(model, verbose),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
)
|
|
|
1 |
from crewai import Task
|
2 |
|
3 |
+
from agents import get_researcher_agent, get_author_agent, get_editor_agent
|
4 |
|
5 |
def get_research_task(model, verbose):
|
6 |
return Task(
|
|
|
15 |
def get_author_task(model, verbose):
|
16 |
return Task(
|
17 |
description=(
|
18 |
+
"1. Use the content to write an in-depth article on topic: {topic}.\n"
|
19 |
+
"2. The output must be in markdown format (omit the triple backticks).\n"
|
20 |
+
"3. At the beginning of the article, add the current date and author: Multi-Agent AI System.\n"
|
21 |
+
"4. At the end of the article, add a references section with links to content provided by the Researcher.\n"
|
22 |
+
"5. Include inline references."
|
23 |
),
|
24 |
expected_output="An article on topic {topic}.",
|
25 |
agent=get_author_agent(model, verbose),
|
26 |
+
)
|
27 |
+
|
28 |
+
def get_edit_task(model, verbose):
|
29 |
+
return Task(
|
30 |
+
description=(
|
31 |
+
"1. Use the APA Style Guide rules and guidelines to edit an article on topic: {topic}.\n"
|
32 |
+
"2. The output must be in markdown format (omit the triple backticks)."
|
33 |
+
),
|
34 |
+
expected_output="An editied article on topic {topic}.",
|
35 |
+
agent=get_editor_agent(model, verbose),
|
36 |
)
|