SuperAPI AI 工具集

rlm-distill-ollama

写作与研究

查看项目

更新于 10-16 08:00

技能介绍

用途:把仓库中的文件提炼为摘要,写入 RLM Summary Ledger,便于后续检索与复用。

主要能力与两条路径:

  1. 智能体蒸馏(默认,快速,不需要 Ollama):由智能体读取文件并通过 inject_summary.py 写入高质量摘要,适用于 1–50 个文件,据资料称比本地 Ollama 更快且摘要质量更好。
  2. Ollama 批量(离线、大批量,50 个以上文件):需要本地运行 Ollama(ollama serve,模型 granite3.2:8b)。

依赖与安装:需要 Python 3.8+,仅标准库,无需外部包。安装命令: pip-compile ./requirements.in pip install -r ./requirements.txt requirements.txt 为依赖锁文件,当前为空(仅标准库)。

使用方式:

  • 智能体路径写入摘要: python3 .agents/skills/rlm-distill-ollama/scripts/inject_summary.py --profile project --file path/to/file.md --summary "Your agent-generated summary here."
  • Ollama 批处理(按 profile 范围全部文件): python3 .agents/skills/rlm-distill-ollama/scripts/distiller.py --profile project
  • 单文件: python3 .agents/skills/rlm-distill-ollama/scripts/distiller.py --profile project --file path/to/file.md
  • 仅处理最近 2 小时变更的文件: python3 .agents/skills/rlm-distill-ollama/scripts/distiller.py --profile project --since 2

Profile 与缓存:--profile project 对应 rlm_summary_cache.json(文档/协议),--profile tools 对应 rlm_tool_cache.json(插件/脚本)。

限制:Ollama 路径要求本地 Ollama 服务与 granite3.2:8b 模型;具体摘要质量、处理速度与文件数量分界的说明均来自上述资料,其他平台支持、收费与更多参数暂未提供。