File size: 808 Bytes
3c84178 |
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 |
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
) |