Spaces:
Sleeping
Sleeping
File size: 1,086 Bytes
d6269a1 93fc605 f15d7ef 93fc605 ea274a5 5ffb8f8 b3d6c85 ea274a5 f15d7ef 82601b2 0262a8b ea274a5 b3d6c85 ea274a5 5ffb8f8 b3d6c85 ea274a5 82601b2 0262a8b ea274a5 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_writer_agent
def get_research_task(model, max_tokens, temperature, verbose):
return Task(
description=(
"1. Search the web for content on topic '{topic}', prioritizing academic papers.\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 a 5000-word detailed paper on topic '{topic}' in markdown format. Omit the triple backticks.\n"
"2. At the beginning of the paper, add current date and author: Multi-Agent AI System.\n"
"3. At the end of the paper, add a references section with links to the academic papers."
),
expected_output="An article on topic {topic}.",
agent=get_writer_agent(model, max_tokens, temperature, verbose),
) |