Spaces:
Running
Running
File size: 1,128 Bytes
d6269a1 93fc605 f15d7ef 93fc605 9f97e4d 5ffb8f8 b3d6c85 9f97e4d 82546d6 82601b2 0262a8b 9f97e4d b3d6c85 9f97e4d 5ffb8f8 b3d6c85 0bd326c dc7db6e ba93310 d070888 82601b2 0262a8b 9f97e4d 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 |
from crewai import Task
from agents import get_researcher_agent, get_writer_agent
def get_research_task(model, verbose):
return Task(
description=(
"1. Search the web for content on topic: {topic}.\n"
"2. Scrape the 25 most relevant web sites for content."
),
expected_output="Content on topic: {topic}.",
agent=get_researcher_agent(model, verbose),
)
def get_write_task(model, verbose):
return Task(
description=(
"1. Use the context to write a 2000-word in-depth article on topic: {topic}.\n"
"2. The output must be in markdown format (omit the triple backticks). Structure the text to include a few numbered and/or unnumbered lists.\n"
"3. At the beginning of the article, add the current date and author: Multi-Agent AI System.\n"
"4. Also at the beginning of the article, add a references section with 10 links to content provided by the Researcher (do not use example.com)."
),
expected_output="An article on topic {topic}.",
agent=get_writer_agent(model, verbose),
) |