-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (24 loc) · 865 Bytes
/
main.py
File metadata and controls
34 lines (24 loc) · 865 Bytes
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
from datetime import datetime
import logging
from pathlib import Path
from crews.flow import TripFlow, TripFlowConfig
from dotenv import load_dotenv
from utils.custom_logger import CustomLogger
from utils.event_listener import LLMEventListener
load_dotenv()
llm_event_listener = LLMEventListener()
if __name__ == "__main__":
country = "Finland"
current_season = "Spring"
# Create logs directory if it doesn't exist
logs_dir = Path("logs") / f"{country}__{current_season}___{datetime.now().strftime('%Y-%m-%d')}"
logs_dir.mkdir(parents=True, exist_ok=True)
CustomLogger.init(logs_dir, file_level=logging.INFO, console_level=logging.WARNING)
flow = TripFlow(
logs_dir=logs_dir,
config=TripFlowConfig(
country=country,
current_season=current_season,
),
)
flow.kickoff()