This repository has been archived on 2026-01-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
DevDen/backend/app/config.py

45 lines
1.1 KiB
Python

from typing import Optional
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# API Keys
ANTHROPIC_API_KEY: Optional[str] = None
OPENAI_API_KEY: Optional[str] = None
# Provider Settings
DEFAULT_PROVIDER: str = "claude"
CLAUDE_MODEL: str = "claude-3-5-sonnet-20241022"
OPENAI_MODEL: str = "gpt-4-turbo-preview"
# API Settings
MAX_TOKENS: int = 4000
TEMPERATURE: float = 0.7
TIMEOUT: int = 60
# CORS
FRONTEND_URL: str = "http://localhost:3000"
# Rate Limiting
RATE_LIMIT_REQUESTS: int = 10
RATE_LIMIT_WINDOW: int = 60
# Microsoft Entra ID
ENTRA_TENANT_ID: Optional[str] = None
ENTRA_CLIENT_ID: Optional[str] = None
ENTRA_CLIENT_SECRET: Optional[str] = None
ENTRA_REDIRECT_URI: str = "http://localhost:3000/auth/callback"
# JWT
JWT_SECRET: str = "change-this-in-production-use-a-secure-random-string"
JWT_ALGORITHM: str = "HS256"
JWT_EXPIRY_HOURS: int = 24
class Config:
env_file = ".env"
case_sensitive = True
settings = Settings()