mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-19 08:28:10 +02:00
feat: add full document mode in knowledge base
This commit is contained in:
parent
c085398933
commit
87c8c5e2c8
26 changed files with 1144 additions and 351 deletions
|
|
@ -0,0 +1,42 @@
|
|||
"""add retrieval mode in document
|
||||
|
||||
Revision ID: e7254d2c6c18
|
||||
Revises: d688d0da1123
|
||||
Create Date: 2026-04-09 13:00:13.020713
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "e7254d2c6c18"
|
||||
down_revision: Union[str, None] = "d688d0da1123"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
"knowledge_base_documents",
|
||||
sa.Column(
|
||||
"retrieval_mode",
|
||||
sa.String(length=20),
|
||||
server_default="chunked",
|
||||
nullable=False,
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"knowledge_base_documents", sa.Column("full_text", sa.Text(), nullable=True)
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("knowledge_base_documents", "full_text")
|
||||
op.drop_column("knowledge_base_documents", "retrieval_mode")
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue