""" PIOE Configuration Management """ from pydantic_settings import BaseSettings from functools import lru_cache from typing import Literal class Settings(BaseSettings): """Application settings loaded from environment variables.""" # AI Configuration ai_provider: Literal["gemini", "openai"] = "gemini" gemini_api_key: str = "" openai_api_key: str = "" # Reddit API reddit_client_id: str = "" reddit_client_secret: str = "" reddit_user_agent: str = "PIOE/1.0" # GitHub API github_token: str = "" # =========================================== # JOB BOARD APIs (Optional - get free keys) # =========================================== # Adzuna API (Free: 250 req/day) # Get at: https://developer.adzuna.com/ adzuna_app_id: str = "" adzuna_api_key: str = "" # Jooble API (Free tier available) # Get at: https://jooble.org/api/about jooble_api_key: str = "" # RapidAPI LinkedIn Jobs (Free: 100 req/month) # Get at: https://rapidapi.com/jaypat87/api/linkedin-jobs-search rapidapi_key: str = "" # =========================================== # Database # =========================================== database_url: str = "sqlite:///./pioe.db" # Ingestion ingestion_interval_hours: int = 6 # Scoring Thresholds (lower = more results saved) min_relevance_score: float = 0.3 # Lowered from 0.4 for more results min_novelty_score: float = 0.3 min_credibility_score: float = 0.5 # Keywords for relevance scoring high_priority_keywords: list[str] = [ "computer vision", "robotics", "ROS", "PyTorch", "TensorFlow", "machine learning", "deep learning", "neural network", "internship", "fellowship", "scholarship", "grant", "funding", "hackathon", "competition", "challenge", "bounty", "research assistant", "PhD", "postdoc", "hiring", "early-stage", "seed", "Series A", "startup", "AI", "artificial intelligence", "data science", "NLP" ] class Config: env_file = ".env" env_file_encoding = "utf-8" extra = "ignore" @lru_cache def get_settings() -> Settings: """Get cached settings instance.""" return Settings()