Skip to content

feat: natural language search #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""add_recording_embedding_and_summary_tables

Revision ID: bd9917da991f
Revises: 98505a067995
Create Date: 2025-06-01 19:10:09.277603

"""
from alembic import op
import sqlalchemy as sa
import openadapt

# revision identifiers, used by Alembic.
revision = 'bd9917da991f'
down_revision = '98505a067995'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('recording_embedding',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('recording_id', sa.Integer(), nullable=True),
sa.Column('embedding', sa.JSON(), nullable=True),
sa.Column('model_name', sa.String(), nullable=True),
sa.Column('timestamp', openadapt.models.ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True),
sa.ForeignKeyConstraint(['recording_id'], ['recording.id'], name=op.f('fk_recording_embedding_recording_id_recording')),
sa.PrimaryKeyConstraint('id', name=op.f('pk_recording_embedding'))
)
op.create_table('recording_summary',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('recording_id', sa.Integer(), nullable=True),
sa.Column('summary_text', sa.Text(), nullable=True),
sa.Column('summary_level', sa.String(), nullable=True),
sa.Column('timestamp', openadapt.models.ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True),
sa.ForeignKeyConstraint(['recording_id'], ['recording.id'], name=op.f('fk_recording_summary_recording_id_recording')),
sa.PrimaryKeyConstraint('id', name=op.f('pk_recording_summary'))
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('recording_summary')
op.drop_table('recording_embedding')
# ### end Alembic commands ###
Loading
Loading