cli-batches
它能做什么
这项技能展示如何通过命令行把大量 AI 请求作为批量任务提交。适合需要把很多模型调用一起处理、并把结果保存到文件的团队。
适用场景
- ✓当用户想把大量 AI 请求作为一个批量任务运行的时候。
- ✓当用户想查看批量任务的进度或取消任务的时候。
- ✓当用户想把批量任务的结果或错误下载到文件的时候。
技能链接
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/cli-batches/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这个 JSONL 格式的提示词文件作为批量任务提交,完成后保存结果。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会上传批量输入文件,然后用选定的接口和时间窗口启动任务,之后可以等待其完成。结果和错误都可以保存到文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overview
Submit and monitor batch inference jobs from the CLI. Upload and manage files for batch processing, retrieve results, and integrate batch pipelines with CI/CD workflows.
Quick install
npm install -g omniroute # or: npx omniroute
omniroute --version
Subcommands
batches
Example:
omniroute batches
batches list
Flags:
--status <s>--limit <n>
Example:
omniroute batches list
batches get <batchId>
Example:
omniroute batches get <batchId>
batches create
Flags:
--input-file <fileId>--endpoint <e>--completion-window <w>--metadata <kv>
Example:
omniroute batches create
batches submit
Flags:
--jsonl <path>--endpoint <e>--wait
Example:
omniroute batches submit
batches cancel <batchId>
Flags:
--yes
Example:
omniroute batches cancel <batchId>
batches wait <batchId>
Flags:
--timeout <ms>
Example:
omniroute batches wait <batchId>
batches output <batchId>
Flags:
--out <path>
Example:
omniroute batches output <batchId>
batches errors <batchId>
Flags:
--out <path>
Example:
omniroute batches errors <batchId>
files
Example:
omniroute files
files list
Flags:
--purpose <p>--limit <n>
Example:
omniroute files list
files get <fileId>
Example:
omniroute files get <fileId>
files upload <path>
Flags:
--purpose <p>
Example:
omniroute files upload <path>
files content <fileId>
Flags:
--out <path>
Example:
omniroute files content <fileId>
files delete <fileId>
Flags:
--yes
Example:
omniroute files delete <fileId>
常见问题
输入需要什么格式?
批量输入是 JSONL 文件,提交命令通过 jsonl 路径选项读取它。
我可以等批量任务完成吗?
可以。提交命令有等待选项,另外还有一个单独的等待命令,可以设置超时。
我可以停止批量任务吗?
可以。取消命令会停止批量任务,除非加上确认参数,否则会先要求确认。
详情
作者的原始描述
Submit and monitor batch inference jobs from the CLI. Upload and manage files for batch processing, retrieve results, and integrate batch pipelines with CI/CD workflows.
热度
- GitHub 星标
- 84k
- 排名
- #1398
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …