|
|
"""Configuration settings for the ad generator.""" |
|
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict |
|
|
from typing import Optional |
|
|
|
|
|
|
|
|
class Settings(BaseSettings): |
|
|
"""Application settings loaded from environment variables.""" |
|
|
|
|
|
model_config = SettingsConfigDict( |
|
|
env_file=".env", |
|
|
env_file_encoding="utf-8", |
|
|
case_sensitive=False, |
|
|
extra="ignore", |
|
|
) |
|
|
|
|
|
|
|
|
openai_api_key: str |
|
|
|
|
|
|
|
|
replicate_api_token: str |
|
|
|
|
|
|
|
|
mongodb_url: Optional[str] = None |
|
|
mongodb_db_name: str = "psyadgenesis" |
|
|
|
|
|
|
|
|
r2_endpoint: Optional[str] = None |
|
|
r2_bucket_name: Optional[str] = None |
|
|
r2_access_key: Optional[str] = None |
|
|
r2_secret_key: Optional[str] = None |
|
|
r2_public_domain: Optional[str] = None |
|
|
|
|
|
|
|
|
llm_model: str = "gpt-4o-mini" |
|
|
llm_temperature: float = 0.95 |
|
|
use_ai_generated_hooks: bool = False |
|
|
|
|
|
|
|
|
vision_model: str = "gpt-4o" |
|
|
|
|
|
|
|
|
third_flow_model: str = "gpt-4o" |
|
|
|
|
|
|
|
|
|
|
|
image_model: str = "z-image-turbo" |
|
|
|
|
|
image_width: int = 1024 |
|
|
image_height: int = 1024 |
|
|
|
|
|
|
|
|
output_dir: str = "assets/generated" |
|
|
|
|
|
|
|
|
environment: str = "development" |
|
|
save_images_locally: bool = True |
|
|
local_image_retention_hours: int = 24 |
|
|
|
|
|
|
|
|
jwt_secret_key: str = "your-secret-key-change-in-production" |
|
|
jwt_algorithm: str = "HS256" |
|
|
jwt_expiration_hours: int = 24 |
|
|
|
|
|
|
|
|
debug: bool = False |
|
|
|
|
|
|
|
|
|
|
|
settings = Settings() |
|
|
|
|
|
|