AI-Trip-Planner / agent.py
rajaramesh's picture
Add application files
3c84178
raw
history blame contribute delete
808 Bytes
from crewai import Agent, LLM
from tools import search
import os
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Get API key
api_key = os.getenv('SAMBANOVA_API_KEY')
if not api_key:
raise ValueError("SAMBANOVA_API_KEY not found in environment variables")
llm = LLM(
model="sambanova/Meta-Llama-3.2-1B-Instruct",
api_key=api_key,
base_url="https://api.sambanova.ai/v1",
temperature=0.5
)
trip_planner_agent = Agent(
role="Trip Planner",
goal="Create a detailed, day-by-day travel itinerary for a given destination and date range, including top attractions and activities.",
backstory="You are an expert travel planner who crafts personalized itineraries based on user preferences and up-to-date information.",
tools=[search],
llm=llm
)