discovery-by-llm/backend/app/domain/models.py

30 lines
673 B
Python

"""Core domain models — pure data, no app-level imports."""
from pydantic import BaseModel
class Track(BaseModel):
"""A resolved, verified track from the catalog."""
spotify_id: str
title: str
artists: list[str]
album: str
album_art_url: str | None = None
class TasteProfile(BaseModel):
"""Compressed listening profile feeding both LLM calls."""
top_artists_long_term: list[str]
top_artists_short_term: list[str]
top_tracks_short_term: list[str]
saved_track_ids: set[str]
class Recommendation(BaseModel):
"""A ranked track with its one-line justification."""
track: Track
justification: str
rank: int