File size: 1,491 Bytes
d6269a1
b624794
faf6aef
93fc605
9f97e4d
5ffb8f8
b3d6c85
9f97e4d
b624794
82601b2
0262a8b
9f97e4d
b3d6c85
 
9b47a3c
5ffb8f8
b3d6c85
faf6aef
b624794
 
 
82601b2
0262a8b
9b47a3c
faf6aef
 
 
 
 
b624794
 
 
faf6aef
 
 
b3d6c85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from crewai import Task
from datetime import datetime
from agents import get_researcher_agent, get_author_agent, get_editor_agent

def get_research_task(model, verbose):
    return Task(
        description=(
            "1. Search the web for content on topic: {topic}.\n"
            "2. Scrape the 10 most relevant web sites for content."
        ),
        expected_output="Content on topic: {topic}.",
        agent=get_researcher_agent(model, verbose),
    )

def get_author_task(model, verbose):
    return Task(
        description=(
            "1. Use the content to write an in-depth article on topic: {topic}.\n"
            "2. At the end of the article, add a references section with links to content provided by the Researcher.\n"
            "3. Include inline references.\n"
            "4. The output must be in markdown format (omit the triple backticks)."
        ),
        expected_output="An article on topic {topic}.",
        agent=get_author_agent(model, verbose),
    )

def get_edit_task(model, verbose):
    return Task(
        description=(
            "1. Use the APA Style Guide to edit an article on topic: {topic}.\n"
            "2. Add the current date, " + datetime.today().strftime("%m/%d/%Y") + ", and author, Multi-Agent AI Assistant.\n"
            "3. The output must be in markdown format (omit the triple backticks)."
        ),
        expected_output="An editied article on topic {topic}.",
        agent=get_editor_agent(model, verbose),
    )