Skip to content

Commit 8204723

Browse files
committed
feat: natural language search
1 parent 1899393 commit 8204723

File tree

10 files changed

+728
-129
lines changed

10 files changed

+728
-129
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"""add_recording_embedding_and_summary_tables
2+
3+
Revision ID: bd9917da991f
4+
Revises: 98505a067995
5+
Create Date: 2025-06-01 19:10:09.277603
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
import openadapt
11+
12+
# revision identifiers, used by Alembic.
13+
revision = 'bd9917da991f'
14+
down_revision = '98505a067995'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade() -> None:
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.create_table('recording_embedding',
22+
sa.Column('id', sa.Integer(), nullable=False),
23+
sa.Column('recording_id', sa.Integer(), nullable=True),
24+
sa.Column('embedding', sa.JSON(), nullable=True),
25+
sa.Column('model_name', sa.String(), nullable=True),
26+
sa.Column('timestamp', openadapt.models.ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True),
27+
sa.ForeignKeyConstraint(['recording_id'], ['recording.id'], name=op.f('fk_recording_embedding_recording_id_recording')),
28+
sa.PrimaryKeyConstraint('id', name=op.f('pk_recording_embedding'))
29+
)
30+
op.create_table('recording_summary',
31+
sa.Column('id', sa.Integer(), nullable=False),
32+
sa.Column('recording_id', sa.Integer(), nullable=True),
33+
sa.Column('summary_text', sa.Text(), nullable=True),
34+
sa.Column('summary_level', sa.String(), nullable=True),
35+
sa.Column('timestamp', openadapt.models.ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True),
36+
sa.ForeignKeyConstraint(['recording_id'], ['recording.id'], name=op.f('fk_recording_summary_recording_id_recording')),
37+
sa.PrimaryKeyConstraint('id', name=op.f('pk_recording_summary'))
38+
)
39+
# ### end Alembic commands ###
40+
41+
42+
def downgrade() -> None:
43+
# ### commands auto generated by Alembic - please adjust! ###
44+
op.drop_table('recording_summary')
45+
op.drop_table('recording_embedding')
46+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)