File size: 872 Bytes
d6269a1
93fc605
e5c64be
93fc605
5bc469b
5ffb8f8
b3d6c85
33215d9
df94726
82601b2
f9bb4a4
6ae3476
b3d6c85
 
5bc469b
5ffb8f8
b3d6c85
2b0155a
78a02cf
 
82601b2
c1636a1
e5c64be
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
from crewai import Task

from agents import get_researcher_agent, get_blogger_agent

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

def get_blog_task(model):
    return Task(
        description=(
            "1. Use the context to write a {word_count}-word blog post on topic {topic}.\n"
            "2. If applicable, pay attention to current date reference.\n"
            "3. If applicable, add a references section with research papers."
        ),
        expected_output="A {word_count}-word blog post on topic {topic}.",
        agent=get_blogger_agent(model),
    )