mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 20:24:32 +02:00
Chat Backend API edge cases handled (#472)
This commit is contained in:
26
backend/alembic/versions/767f1c2a00eb_count_chat_tokens.py
Normal file
26
backend/alembic/versions/767f1c2a00eb_count_chat_tokens.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Count Chat Tokens
|
||||
|
||||
Revision ID: 767f1c2a00eb
|
||||
Revises: dba7f71618f5
|
||||
Create Date: 2023-09-21 10:03:21.509899
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "767f1c2a00eb"
|
||||
down_revision = "dba7f71618f5"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"chat_message", sa.Column("token_count", sa.Integer(), nullable=False)
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("chat_message", "token_count")
|
Reference in New Issue
Block a user