- migration 00006: track features and embeddings (pgvector, HNSW), analysis queue filled by a trigger on new tracks, wave sessions and impressions, recommender profiles, model versions - analyzer basic-1 (ADR-014): ffmpeg decode, three 30 s excerpts, 256-d timbre/rhythm embedding, tempo by onset autocorrelation, key, loudness, energy, danceability, acousticness, intro length; worker with SKIP LOCKED claims, retries and re-analysis on version change - wave engine v1: candidates (session/taste similarity, fresh, liked artists, rediscover, popular, exploration, seed), filters (dislikes, played in 3 h, already served), heuristic score, activity and mood fit from contexts.yaml with relaxing thresholds, MMR with one track per artist, exploration share, session vector updated by reactions and a change of course after three skips - POST /internal/wave/batch with the catalog index cached in memory and the session kept in Redis Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
915 B
Python
21 lines
915 B
Python
"""Конфигурация сервиса из переменных окружения."""
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_prefix="", extra="ignore")
|
|
|
|
http_host: str = "0.0.0.0"
|
|
http_port: int = 8000
|
|
database_url: str = Field(default="postgresql://pipu:pipu@postgres:5432/pipu")
|
|
redis_url: str = Field(default="redis://redis:6379/0")
|
|
internal_token: str = Field(default="", description="Общий секрет для вызовов из api")
|
|
log_level: str = "info"
|
|
library_root: str = "/library"
|
|
library_host_root: str = "/library-host"
|
|
ffmpeg_path: str = "ffmpeg"
|
|
contexts_path: str = Field(default="", description="contexts.yaml; пусто — встроенный")
|
|
version: str = Field(default="0.0.0-dev", alias="PIPU_VERSION")
|