Amitabhab commited on
Commit
c78dd58
·
1 Parent(s): 99bcc63

Adding a scout for shopping options

Browse files
Files changed (3) hide show
  1. config/agents.yaml +8 -0
  2. config/tasks.yaml +26 -1
  3. crew.py +19 -0
config/agents.yaml CHANGED
@@ -22,6 +22,14 @@ museum_scout:
22
  backstory: >
23
  You know the best museums in town for different age groups. Older people may like quieter museums such as art museums. Young children like museums where they can get to touch, feel, and play.
24
 
 
 
 
 
 
 
 
 
25
  itinerary_compiler:
26
  role: >
27
  Itinerary Compiler
 
22
  backstory: >
23
  You know the best museums in town for different age groups. Older people may like quieter museums such as art museums. Young children like museums where they can get to touch, feel, and play.
24
 
25
+ shopping_scout:
26
+ role: >
27
+ Shopping Scout
28
+ goal: >
29
+ Find good areas for shopping. This can include local markets where visitors can buy souvenir, glamorous shopping mall, and flea markets where visiors can buy used goods. If children are accompanying, pick shopping options with suitable amenities and entertainment options for children.
30
+ backstory: >
31
+ You are an expert of the city and good at finding shopping options where high quality goods reflecting the local values and culture can be bought at a discount
32
+
33
  itinerary_compiler:
34
  role: >
35
  Itinerary Compiler
config/tasks.yaml CHANGED
@@ -67,9 +67,34 @@ museum_scout_task:
67
 
68
  - budget for entire trip in dollars: {budget}
69
  expected_output: >
70
- A list of recommended restaurants for each day of the trip.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  Each entry should include the name, location including a detailed address, type of cuisine or activity, and a brief description and ratings.
72
 
 
73
  itinerary_compilation_task:
74
  description: >
75
  Compile all researched information into a comprehensive day-by-day itinerary for the trip to {destination}.
 
67
 
68
  - budget for entire trip in dollars: {budget}
69
  expected_output: >
70
+ A list of recommended museums. There need not be a museum for each day of the trip.
71
+ Each entry should include the name, location including a detailed address, type of cuisine or activity, and a brief description and ratings.
72
+
73
+ shopping_scout_task:
74
+ description: >
75
+ Find popular shopping at {destination}. Check if children are accompanying in the trip. {children}
76
+ If children are accompanying, find shopping areas that might be more appealing to children.
77
+ Use internet search tools, feedback from users, and travel guides to make the decision.
78
+ Extract the address of the shopping area so that the same can be displayed to the user.
79
+
80
+ Traveler's information:
81
+
82
+ - origin: {origin}
83
+
84
+ - destination: {destination}
85
+
86
+ - age of the traveler: {age}
87
+
88
+ - Are children accompanying the trip: {children}
89
+
90
+ - how long is the trip: {trip_duration}
91
+
92
+ - budget for entire trip in dollars: {budget}
93
+ expected_output: >
94
+ A list of recommended shopping areas for each day of the trip. Shopping options need not be provided for each day of the trip.
95
  Each entry should include the name, location including a detailed address, type of cuisine or activity, and a brief description and ratings.
96
 
97
+
98
  itinerary_compilation_task:
99
  description: >
100
  Compile all researched information into a comprehensive day-by-day itinerary for the trip to {destination}.
crew.py CHANGED
@@ -50,6 +50,16 @@ class TravelCrew():
50
  allow_delegation=False,
51
  )
52
 
 
 
 
 
 
 
 
 
 
 
53
  @agent
54
  def itinerary_compiler(self) -> Agent:
55
  return Agent(
@@ -86,6 +96,15 @@ class TravelCrew():
86
  agent=self.museum_scout()
87
  )
88
 
 
 
 
 
 
 
 
 
 
89
  @task
90
  def itinerary_compilation_task(self) -> Task:
91
  return Task(
 
50
  allow_delegation=False,
51
  )
52
 
53
+ @agent
54
+ def shopping_scout(self) -> Agent:
55
+ return Agent(
56
+ config=self.agents_config['shopping_scout'],
57
+ llm=llm,
58
+ max_iter=1,
59
+ tools=[SerperDevTool(), ScrapeWebsiteTool()],
60
+ allow_delegation=False,
61
+ )
62
+
63
  @agent
64
  def itinerary_compiler(self) -> Agent:
65
  return Agent(
 
96
  agent=self.museum_scout()
97
  )
98
 
99
+ @task
100
+ def shopping_scout_task(self) -> Task:
101
+ return Task(
102
+ config=self.tasks_config['shopping_scout_task'],
103
+ llm=llm,
104
+ max_iter=1,
105
+ agent=self.shopping_scout()
106
+ )
107
+
108
  @task
109
  def itinerary_compilation_task(self) -> Task:
110
  return Task(