-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.py
30 lines (28 loc) · 1010 Bytes
/
tasks.py
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
from crewai import Task
from tools import tool
from agents import news_researcher,news_writer
# Research task
research_task = Task(
description=(
'''Identify the next big trend in {topic}.
Focus on identifying pros and cons and the overall narrative.
Your final report should clearly articulate the key points,
its market opportunities, and potential risks.'''
),
expected_output='A comprehensive 3 paragraphs long report on the latest trends.',
tools=[tool],
agent=news_researcher,
)
# Writing task with language model configuration
write_task = Task(
description=(
'''Compose an insightful article on {topic}."
Focus on the latest trends and how it's impacting the industry.
This article should be easy to understand, engaging, and positive.'''
),
expected_output='A 4 paragraph article on {topic} advancements in markdown format.',
tools=[tool],
agent=news_writer,
async_execution=False,
output_file='output/post.md' # Example of output customization
)