Add vibe-aware playlists with CLAP text embeddings
Blend taste profile with text-embedded mood descriptions (e.g. "chill ambient lo-fi") using pre-blended vector search against the existing HNSW index. New optional `vibe` and `alpha` params on playlist generate and recommendations endpoints. Backward compatible — no vibe = pure taste profile (alpha=1.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
alembic/versions/002_add_playlist_vibe.py
Normal file
26
alembic/versions/002_add_playlist_vibe.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Add vibe and alpha columns to playlists
|
||||
|
||||
Revision ID: 002
|
||||
Revises: 001
|
||||
Create Date: 2026-02-22
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "002"
|
||||
down_revision: Union[str, None] = "001"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("playlists", sa.Column("vibe", sa.Text, nullable=True))
|
||||
op.add_column("playlists", sa.Column("alpha", sa.REAL, nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("playlists", "alpha")
|
||||
op.drop_column("playlists", "vibe")
|
||||
Reference in New Issue
Block a user