Spaces:
Sleeping
Sleeping
yonnel
Add adult content filtering option and update related functionality in TMDBClient and settings
0236fb6
""" | |
Settings and environment configuration | |
""" | |
import os | |
from functools import lru_cache | |
from pydantic_settings import BaseSettings | |
class Settings(BaseSettings): | |
"""Application settings""" | |
# OpenAI API key for embeddings | |
openai_api_key: str | |
# TMDB API key for movie data | |
tmdb_api_key: str | |
# API authentication token | |
api_token: str | |
# Environment (dev/prod) | |
env: str = "dev" | |
# Logging level | |
log_level: str = "INFO" | |
# Filter adult content (True = exclude adult films, False = include all) | |
filter_adult_content: bool = True | |
class Config: | |
env_file = ".env" | |
env_file_encoding = "utf-8" | |
def get_settings() -> Settings: | |
"""Get cached settings instance""" | |
return Settings() |