-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.py
More file actions
25 lines (20 loc) · 751 Bytes
/
tasks.py
File metadata and controls
25 lines (20 loc) · 751 Bytes
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
"""Tasks module."""
from crewai import Task
from agents import QueryAgents
agents = QueryAgents()
class QueryTasks:
def query_extraction_task(self) -> Task:
return Task(
description="Extract the statistic to search for from the user query",
expected_output="The statistic to search for",
agent=agents.extractor_agent(),
human_input=True,
output_file="stasts.txt",
)
def query_construction_task(self) -> Task:
return Task(
description="Construct a query to search for the statistic online",
expected_output="The search results",
agent=agents.query_constructor(),
output_file="search_queries.txt",
)