聊天和回忆录证据检索都走 pgvector,去掉 Postgres FTS/content_tsv,新迁移删掉 content_tsv 列(部署要先 alembic upgrade)。
Embedding 端口增加 is_available(),聊天和回忆录日志用统一方式表示向量是否真能调用。 记忆整理(compaction)支持 Beat 定期扫用户; 事实抽取提示与 subject 归一化,减少同一人多种称呼;
This commit is contained in:
28
api/alembic/versions/0007_drop_chunk_content_tsv.py
Normal file
28
api/alembic/versions/0007_drop_chunk_content_tsv.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""移除 memory_chunks.content_tsv(FTS 列已停用,检索统一向量)。
|
||||
|
||||
Revision ID: 0007_drop_chunk_content_tsv
|
||||
Revises: 0006_segment_memoir_phases
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0007_drop_chunk_content_tsv"
|
||||
down_revision: Union[str, None] = "0006_segment_memoir_phases"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.drop_column("memory_chunks", "content_tsv")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.add_column(
|
||||
"memory_chunks",
|
||||
sa.Column("content_tsv", postgresql.TSVECTOR(), nullable=True),
|
||||
)
|
||||
Reference in New Issue
Block a user