File size: 2,014 Bytes
2cea028
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
from textwrap import dedent
from crewai import Task

class TripPlanTask:
    def research_task(self, agent, city, month):
        return Task(
            description=dedent(f"""\

            Conduct an in-depth reserach about the city for plannin the trip to make the best outcome of the visiting month and enjoy the upcoming festivals and local events. Gather information from various news, articles, blogs, books and any relevant source of information.

            

            City: {city}

            Month: {month}"""),
            expected_output=dedent(f"""/

            A detailed report summarizing key findings about the city and month visiting, highlighting the information that could be relevant."""),
            agent=agent,
            async_execution=True
        )

    def trip_planning_task(self, agent, city, month):
        return Task(
            description=dedent(f"""\

            Develop a report to visit the best places in that city during the visiting month for the trip based on the research and analysis conducted

            

            City: {city}

            Month: {month}"""),
            expected_output=dedent(f"""/

            A detailed report summarizing key findings about the city and month visiting, highlighting the information that could be relevant."""),
            agent=agent,
            async_execution=True
        )

    def summary_and_plan(self, agent, city):
        return Task(
            description=dedent(f"""\

            Compile all the research findings, report and analysis into a concise, comprehensive briefing document for the trip. Ensure the briefing is easy to digest and equips with all necessary information.

            

            City:{city}"""),
            expected_output=dedent("""\

            A well-structured briefing document that includes sections forbest time to travel, city overview, points of intrest to visit, and tourist recommendations."""),
            agent=agent
        )