feat(backend): knowledge iteration + vision + neo4j + response contract source

dependencies.py 拆分为 dependencies/ 包; 新增 vision/ragflow_ingestion/neo4j 客户端与 h5_ai_task; alembic 045 图置信度迁移; 响应契约统一收尾。
This commit is contained in:
Simon
2026-07-09 11:47:16 +08:00
parent f5374fce9b
commit ead5f83bee
39 changed files with 5276 additions and 545 deletions
+20 -1
View File
@@ -8,7 +8,7 @@
import uuid
from datetime import datetime
from typing import List
from typing import List, Optional
from sqlalchemy import DateTime, Index, Integer, JSON, String, Text
from sqlalchemy.orm import Mapped, mapped_column
@@ -93,6 +93,25 @@ class KnowledgeBase(Base):
comment="使用次数",
)
# --------------------------------------------------------------------------
# Tier0 扩展字段 — 图同步状态(D1 解读2 合一)
# --------------------------------------------------------------------------
# 图同步状态(pending / synced / failed
graph_sync_status: Mapped[str] = mapped_column(
String(20),
nullable=False,
default="pending",
comment="图同步状态:pending / synced / failed",
)
# 关联 Neo4j Issue 节点的 uuid(写入图后回填)
graph_node_uuid: Mapped[Optional[str]] = mapped_column(
String(36),
nullable=True,
comment="关联 Neo4j Issue 节点的 uuid",
)
# 创建时间
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),