bstraehle's picture
Update tasks.py
fd3a4f4 verified
raw
history blame
1.09 kB
from crewai import Task
from agents import get_researcher_agent, get_writer_agent
def get_research_task(model, max_tokens, temperature, verbose):
return Task(
description=(
"1. Search the web for content on topic '{topic}', prioritizing scientific sources.\n"
"2. Scrape the 10 most relevant web sites for content."
),
expected_output="Content on topic: {topic}.",
agent=get_researcher_agent(model, max_tokens, temperature, verbose),
)
def get_write_task(model, max_tokens, temperature, verbose):
return Task(
description=(
"1. Use the context to write an article on topic '{topic}'. Output must be in markdown format (omit the triple backticks).\n"
"2. At the beginning of the article, add current date and author: Multi-Agent AI System.\n"
"3. At the end of the article, add a references section with links to relevant content."
),
expected_output="An article on topic {topic}.",
agent=get_writer_agent(model, max_tokens, temperature, verbose),
)