Spaces:
Sleeping
Sleeping
File size: 3,265 Bytes
cd6f412 | 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | import os
from dotenv import load_dotenv
from pydantic_settings import BaseSettings
from typing import List
# Load environment variables from .env file
load_dotenv()
class Settings(BaseSettings):
"""
Loads and validates application settings from environment variables.
"""
# API Keys
GROQ_API_KEY: str = os.getenv("GROQ_API_KEY", "")
GOOGLE_API_KEY: str = os.getenv("GOOGLE_API_KEY", "")
TAVILY_API_KEY: str = os.getenv("TAVILY_API_KEY", "")
# JWT Settings
JWT_SECRET_KEY: str = os.getenv("JWT_SECRET_KEY", "default_secret")
JWT_ALGORITHM: str = os.getenv("JWT_ALGORITHM", "HS256")
ACCESS_TOKEN_EXPIRE_MINUTES: int = int(os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES", 30))
# Database
DATABASE_URL: str = "insucompass.db"
# Logging
LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO")
# LLM Settings
GROQ_MODEL_NAME: str = "llama-3.3-70b-versatile"
GROQ_FAST_MODEL_NAME: str = "llama-3.1-8b-instant"
GEMINI_PRO_MODEL_NAME: str = "gemini-2.5-pro"
GEMINI_MODEL_NAME: str = "gemini-2.5-flash" #"gemini-2.5-flash" # "gemini-2.0-flash"
GEMINI_FAST_MODEL_NAME: str = "gemini-2.5-flash-lite-preview-06-17"
# CRAWLING JOBS CONFIGURATION
CRAWLING_JOBS: List[dict] = [
{
"name": "HealthCare.gov Crawl",
"start_url": "https://www.healthcare.gov/",
"method": "requests_crawl",
"domain_lock": "www.healthcare.gov",
"crawl_depth": 2,
"content_types": ["pdf", "html"],
"status": "active"
},
{
"name": "CMS.gov Regulations & Guidance Crawl",
"start_url": "https://www.cms.gov/regulations-and-guidance",
"method": "selenium_crawl",
"domain_lock": "www.cms.gov",
"crawl_depth": 2,
"content_types": ["pdf", "html"],
"status": "active"
},
{
"name": "Medicaid.gov Crawl",
"start_url": "https://www.medicaid.gov/",
"method": "requests_crawl",
"domain_lock": "www.medicaid.gov",
"crawl_depth": 2,
"content_types": ["pdf", "html"],
"status": "active"
},
{
"name": "Medicare.gov Crawl",
"start_url": "https://www.medicare.gov/",
"method": "selenium_crawl",
"domain_lock": "www.medicare.gov",
"crawl_depth": 1,
"content_types": ["html"],
"status": "active"
},
{
"name": "TRICARE Publications Crawl",
"start_url": "https://www.tricare.mil/publications",
"method": "selenium_crawl",
"domain_lock": "www.tricare.mil",
"crawl_depth": 1,
"content_types": ["pdf", "html"],
"status": "active"
},
{
"name": "VA.gov Health Benefits Crawl",
"start_url": "https://www.va.gov/health-care/",
"method": "requests_crawl",
"domain_lock": "www.va.gov",
"crawl_depth": 2,
"content_types": ["html"],
"status": "active"
},
]
class Config:
case_sensitive = True
# Instantiate settings
settings = Settings() |