本项目独立维护脚本解构检索索引,不导入或运行上一代项目。原始 JSON 只读,索引由
script_build_host.infrastructure.decode_index_builder 全量生成。
默认合同:
text-embedding-v4;float16 本地存储;在 script_build_host/ 下执行:
./.venv/bin/python -m script_build_host.infrastructure.decode_index_builder \
--raw-root .local/legacy-inputs/decode/script_decode_raw_data \
--index-root .local/legacy-inputs/decode/index \
--env-file .env \
--model text-embedding-v4 \
--dimension 512 \
--batch-size 10 \
--concurrency 8 \
--shard-size 1000 \
--storage-dtype float16
密钥从 DASHSCOPE_API_KEY 或 SCRIPT_BUILD_EMBEDDING_API_KEY 读取。若输入、模型或维度
改变,而目录中存在不兼容的断点数据,增加 --reset-work 明确清理后重建。
发布产物固定为:
index/meta.jsonl:与每行向量一一对应的检索元数据;index/embeddings.npy:二维向量矩阵;index/manifest.json:模型、维度、数量、token 用量、来源和产物 SHA-256。