SuperAPI AI 工具集

vdb-ingest

数据与分析

查看项目

更新于 10-16 08:00

技能介绍

用途:把仓库文件索引进 ChromaDB 向量库,构建或更新父子分块结构,作为后续语义搜索的后端索引,属于写操作。

主要能力:支持全量重建、按时间增量(如 --since 24 仅处理新改文件)、代码文件处理(--code,对 .py/.js 自动调用 ingest_code_shim.py,以函数和类为离散分块而非原始文本块)。

必要用法:首次使用若未装 chromadb 或缺少 vector_profiles.json,先运行 python3 plugins/vector-db/skills/vector-db-init/scripts/init.py。用 curl -sf http://127.0.0.1:8110/api/v1/heartbeat 检查服务,未启动则用 chroma run --host 127.0.0.1 --port 8110 --path .vector_data &。全量:python3 plugins/vector-db/skills/vector-db-agent/scripts/ingest.py --profile knowledge --full;增量:同命令加 --since 24;代码:加 --full --code。入库后用 query.py 冒烟测试,例如 python3 plugins/vector-db/skills/vector-db-agent/scripts/query.py "describe what was just ingested" --profile knowledge --limit 3。

规则与限制:不要直接写 .vector_data/,始终经 ingest.py;不要用 cat 或 sqlite3 读取 .sqlite3 文件以免损坏上下文;需声明所用 profile、文件数与错误。其余细节暂未提供。