Spaces:
Sleeping
Sleeping
Update tasks.py
Browse files
tasks.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
from crewai import Task
|
2 |
|
3 |
-
from agents import
|
4 |
|
5 |
-
def
|
6 |
return Task(
|
7 |
description=(
|
8 |
"1. Prioritize the latest trends, key players, "
|
@@ -16,10 +16,10 @@ def get_plan_task():
|
|
16 |
expected_output="A comprehensive content plan document "
|
17 |
"with an outline, audience analysis, "
|
18 |
"SEO keywords, and resources.",
|
19 |
-
agent=
|
20 |
)
|
21 |
|
22 |
-
def
|
23 |
return Task(
|
24 |
description=(
|
25 |
"1. Use the content plan to craft a compelling "
|
@@ -36,10 +36,10 @@ def get_write_task():
|
|
36 |
expected_output="A well-written blog post "
|
37 |
"in markdown format, ready for publication, "
|
38 |
"each section should have 2 or 3 paragraphs.",
|
39 |
-
agent=
|
40 |
)
|
41 |
|
42 |
-
def
|
43 |
return Task(
|
44 |
description=("Proofread the given blog post for "
|
45 |
"grammatical errors and "
|
@@ -47,5 +47,5 @@ def get_edit_task():
|
|
47 |
expected_output="A well-written blog post in markdown format, "
|
48 |
"ready for publication, "
|
49 |
"each section should have 2 or 3 paragraphs.",
|
50 |
-
agent=
|
51 |
)
|
|
|
1 |
from crewai import Task
|
2 |
|
3 |
+
from agents import get_content_planner_agent, get_content_writer_agent, get_editor_agent
|
4 |
|
5 |
+
def get_content_planner_task():
|
6 |
return Task(
|
7 |
description=(
|
8 |
"1. Prioritize the latest trends, key players, "
|
|
|
16 |
expected_output="A comprehensive content plan document "
|
17 |
"with an outline, audience analysis, "
|
18 |
"SEO keywords, and resources.",
|
19 |
+
agent=get_content_planner_agent()
|
20 |
)
|
21 |
|
22 |
+
def get_content_writer_task():
|
23 |
return Task(
|
24 |
description=(
|
25 |
"1. Use the content plan to craft a compelling "
|
|
|
36 |
expected_output="A well-written blog post "
|
37 |
"in markdown format, ready for publication, "
|
38 |
"each section should have 2 or 3 paragraphs.",
|
39 |
+
agent=get_content_writer_agent()
|
40 |
)
|
41 |
|
42 |
+
def get_editor_task():
|
43 |
return Task(
|
44 |
description=("Proofread the given blog post for "
|
45 |
"grammatical errors and "
|
|
|
47 |
expected_output="A well-written blog post in markdown format, "
|
48 |
"ready for publication, "
|
49 |
"each section should have 2 or 3 paragraphs.",
|
50 |
+
agent=get_editor_agent()
|
51 |
)
|