feat: feat: add interface params

This commit is contained in:
Swayam 2025-10-06 03:00:25 +05:30
parent 6b7ce53c58
commit 9f99b09e0d
3 changed files with 51 additions and 2 deletions

View file

@ -0,0 +1,38 @@
"""add inference_params to searchspaces
Revision ID: eb0c978da8fd
Revises: 22
Create Date: 2025-10-06 02:54:11.618100
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'eb0c978da8fd'
down_revision: Union[str, None] = '22'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('chucks_search_index'), table_name='chunks', postgresql_using='gin')
op.drop_index(op.f('chucks_vector_index'), table_name='chunks', postgresql_using='hnsw')
op.drop_index(op.f('document_search_index'), table_name='documents', postgresql_using='gin')
op.drop_index(op.f('document_vector_index'), table_name='documents', postgresql_using='hnsw')
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_index(op.f('document_vector_index'), 'documents', ['embedding'], unique=False, postgresql_using='hnsw')
op.create_index(op.f('document_search_index'), 'documents', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
op.create_index(op.f('chucks_vector_index'), 'chunks', ['embedding'], unique=False, postgresql_using='hnsw')
op.create_index(op.f('chucks_search_index'), 'chunks', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
# ### end Alembic commands ###