clip-forge/backend/app/config.py

42 lines
1.2 KiB
Python

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# Database
database_url: str = "postgresql+asyncpg://clipforge:changeme_clipforge_2025@postgres:5432/clipforge"
# Redis
redis_url: str = "redis://redis:6379/0"
# Whisper
whisper_api_url: str = "https://whisper.jeffemmett.com"
whisper_model: str = "deepdml/faster-whisper-large-v3-turbo-ct2"
# AI Analysis - supports "ollama" or "openai" (OpenAI-compatible API)
ai_provider: str = "ollama" # "ollama" or "openai"
ollama_url: str = "http://host.docker.internal:11434"
ollama_model: str = "llama3.1:8b"
openai_api_url: str = "" # e.g. https://api.runpod.ai/v2/{endpoint_id}/openai/v1
openai_api_key: str = ""
openai_model: str = "" # e.g. meta-llama/Llama-3.1-8B-Instruct
# Storage
media_dir: str = "/data/media"
clips_dir: str = "/data/clips"
renders_dir: str = "/data/renders"
# yt-dlp
ytdlp_cookies_file: str = ""
max_video_duration: int = 7200
# Processing
max_concurrent_jobs: int = 2
clip_min_duration: int = 15
clip_max_duration: int = 90
target_clips: int = 5
model_config = {"env_file": ".env", "extra": "ignore"}
settings = Settings()