Spaces:
Running
Running
Update tasks.py
Browse files
tasks.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 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(
|
| 7 |
description=(
|
| 8 |
"1. Search the web for content on topic: {topic}.\n"
|
| 9 |
-
"2. Scrape the
|
| 10 |
),
|
| 11 |
expected_output="Content on topic: {topic}.",
|
| 12 |
agent=get_researcher_agent(model, verbose),
|
|
@@ -16,10 +16,9 @@ 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.
|
| 20 |
-
"3.
|
| 21 |
-
"4.
|
| 22 |
-
"5. Include inline references."
|
| 23 |
),
|
| 24 |
expected_output="An article on topic {topic}.",
|
| 25 |
agent=get_author_agent(model, verbose),
|
|
@@ -28,8 +27,9 @@ def get_author_task(model, verbose):
|
|
| 28 |
def get_edit_task(model, verbose):
|
| 29 |
return Task(
|
| 30 |
description=(
|
| 31 |
-
"1. Use the APA Style Guide
|
| 32 |
-
"2.
|
|
|
|
| 33 |
),
|
| 34 |
expected_output="An editied article on topic {topic}.",
|
| 35 |
agent=get_editor_agent(model, verbose),
|
|
|
|
| 1 |
from crewai import Task
|
| 2 |
+
from datetime import datetime
|
| 3 |
from agents import get_researcher_agent, get_author_agent, get_editor_agent
|
| 4 |
|
| 5 |
def get_research_task(model, verbose):
|
| 6 |
return Task(
|
| 7 |
description=(
|
| 8 |
"1. Search the web for content on topic: {topic}.\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, verbose),
|
|
|
|
| 16 |
return Task(
|
| 17 |
description=(
|
| 18 |
"1. Use the content to write an in-depth article on topic: {topic}.\n"
|
| 19 |
+
"2. At the end of the article, add a references section with links to content provided by the Researcher.\n"
|
| 20 |
+
"3. Include inline references.\n"
|
| 21 |
+
"4. The output must be in markdown format (omit the triple backticks)."
|
|
|
|
| 22 |
),
|
| 23 |
expected_output="An article on topic {topic}.",
|
| 24 |
agent=get_author_agent(model, verbose),
|
|
|
|
| 27 |
def get_edit_task(model, verbose):
|
| 28 |
return Task(
|
| 29 |
description=(
|
| 30 |
+
"1. Use the APA Style Guide to edit an article on topic: {topic}.\n"
|
| 31 |
+
"2. Add the current date, " + datetime.today().strftime("%m/%d/%Y") + ", and author, Multi-Agent AI Assistant.\n"
|
| 32 |
+
"3. 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),
|