Skip to content

[codex] 数据集绑定向量模型配置#141

Merged
Fang0415 merged 1 commit into
devfrom
codex/dataset-embedding-bindings
Jun 28, 2026
Merged

[codex] 数据集绑定向量模型配置#141
Fang0415 merged 1 commit into
devfrom
codex/dataset-embedding-bindings

Conversation

@Fang0415

Copy link
Copy Markdown
Contributor

变更内容

  • 在数据集创建请求和 dataset_parse_config 中新增 sparse_embedding_config_id / dense_embedding_config_id,分别绑定稀疏、稠密向量模型配置。
  • 新增 DatasetEmbeddingConfigValidator,校验绑定配置属于当前用户、启用中且能力匹配。
  • 创建数据集时强制写入模型绑定;解析配置 GET/PUT 支持回显和重绑。
  • 召回 session 签发前校验数据集已有有效稀疏/稠密向量模型绑定,避免召回阶段继续使用漂移的默认模型。
  • 增加数据库迁移脚本 scripts/db/add_dataset_embedding_config_bindings.sql,同步 H2 schema、API/MySQL/测试文档和相关测试。

影响

  • 前端创建数据集需要新增两个必填模型选择项。
  • Python RAG 端需要读取这两个字段,并在解析建向量、召回 query 编码时使用数据集绑定的配置。
  • 历史数据集需要回填绑定;未补齐时召回 session 会被拒签。

验证

  • mvn -am -pl link-service,link-api -DfailIfNoTests=false -Dtest=DatasetServiceImplTest,DatasetParseConfigServiceImplTest,RecallSessionServiceImplTest,DatasetControllerTest,DatasetParseConfigControllerTest,RecallSessionControllerTest,SoftDeleteReuseIntegrationTest test
  • python3 scripts/check_docs_sync.py --working
  • python3 scripts/check_ai_links.py

备注

全量 mvn test -DfailIfNoTests=false 当前仍有既有 AdminControllerProviderTest 403 失败,和本次数据集向量模型绑定改动无直接交集。

@Fang0415 Fang0415 marked this pull request as ready for review June 28, 2026 08:26
@Fang0415 Fang0415 merged commit a0b428e into dev Jun 28, 2026
1 check passed
@jixua jixua mentioned this pull request Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant