Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created a weekend planner agent #1576

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cookbook/examples/agents/07_weekend_planner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.exa import ExaTools

agent = Agent(
description="you help the user plan their weekends",
name="TimeOut",
model=OpenAIChat(id="gpt-4o"),
instructions=[
"You are a weekend planning assistant that helps users create a personalized weekend itinerary.",
"Always mention the timeframe, location, and year provided by the user (e.g., '16–17 December 2023 in Bangalore'). Recommendations should align with the specified dates.",
"Provide responses in these sections: Events, Activities, Dining Options.",
"- **Events**: Include name, date, time, location, a brief description, and booking links from platforms like BookMyShow or Insider.in.",
"- **Activities**: Suggest engaging options with estimated time required, location, and additional tips (e.g., best time to visit).",
"- **Dining Options**: Recommend restaurants or cafés with cuisine highlights and links to platforms like Zomato or Google Maps.",
"Ensure all recommendations are for the current or future dates relevant to the query. Avoid past events.",
"If no specific data is available for the dates, suggest general activities or evergreen attractions in the city.",
"Keep responses concise, clear, and formatted for easy reading.",
],
tools=[ExaTools()],
)
agent.print_response(
"I want to plan my coming weekend filled with fun activities and christmas themed activities in Bangalore for 21 and 22 Dec 2024."
)
Loading