from pydantic_settings import BaseSettings
from functools import lru_cache
from typing import Optional
from pydantic import Field
class Settings(BaseSettings):
    PROVIDER:str = 'azure'
    LLM1: str = "Csqr-gpt-4o-mini"
    LLM2: str ="Csqr_gpt-4o_Key"
    LLM_FOR_REVIEW: str ="Csqr_gpt-4o_Key"
    TEMPERATURE: float = 0.7
    SEED: int = 42
    TIMEOUT: int = 6000
    OPENAI_KEY1: str
    OPENAI_KEY2: str
    ENDPOINT1: str
    ENDPOINT2: str
    API_VERSION1: str
    API_VERSION2: str
    def __init__(self, **values):
        super().__init__(**values)
        # print("Settings initialized with:", self.model_dump())

 
    class Config:
        env_file = "/home/azureuser/microlearn/backend/user_journey_with_openai/agentic_workflow/src/user_journey_service/.env"
        env_file_encoding = "utf-8"
        #extra = "ignore"  # Add this to ignore extra env vars
 
@lru_cache()
def get_settings() -> Settings:
    return Settings()
 
# Create exported settings instance
settings = get_settings()
