API key working, CORS working, SocketIO working (but no JWT), Chat client v1, Session implemented (server side)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""Defined interaction domain
|
||||
|
||||
Revision ID: 505b61314bba
|
||||
Revises: e2735d216d3c
|
||||
Create Date: 2024-05-20 08:20:19.786246
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '505b61314bba'
|
||||
down_revision = 'e2735d216d3c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,56 @@
|
||||
"""Defined interaction domain 2
|
||||
|
||||
Revision ID: 53fee8f13cdb
|
||||
Revises: 505b61314bba
|
||||
Create Date: 2024-05-20 08:37:25.182616
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '53fee8f13cdb'
|
||||
down_revision = '505b61314bba'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('chat_session',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('session_start', sa.DateTime(), nullable=False),
|
||||
sa.Column('session_end', sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['public.user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('interaction',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('chat_session_id', sa.Integer(), nullable=False),
|
||||
sa.Column('question', sa.Text(), nullable=False),
|
||||
sa.Column('answer', sa.Text(), nullable=True),
|
||||
sa.Column('language', sa.String(length=2), nullable=False),
|
||||
sa.Column('appreciation', sa.Integer(), nullable=True),
|
||||
sa.Column('question_at', sa.DateTime(), nullable=False),
|
||||
sa.Column('answer_at', sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['chat_session_id'], ['chat_session.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('interaction_embedding',
|
||||
sa.Column('interaction_id', sa.Integer(), nullable=False),
|
||||
sa.Column('embedding_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['embedding_id'], ['embeddings.id'], ondelete='CASCADE'),
|
||||
sa.ForeignKeyConstraint(['interaction_id'], ['interaction.id'], ondelete='CASCADE'),
|
||||
sa.PrimaryKeyConstraint('interaction_id', 'embedding_id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('interaction_embedding')
|
||||
op.drop_table('interaction')
|
||||
op.drop_table('chat_session')
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,28 @@
|
||||
"""Defined interaction domain
|
||||
|
||||
Revision ID: e2735d216d3c
|
||||
Revises: f88854b2ac59
|
||||
Create Date: 2024-05-17 18:56:10.547571
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'e2735d216d3c'
|
||||
down_revision = 'f88854b2ac59'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user