使用 OpenClaw `infer` CLI 处理 provider 支持的模型、图像、音频转录、语音合成、视频、网络搜索和嵌入任务。
OpenClaw Infer.是一项面向实际任务的技能,主要用于Prefer openclaw 推断... 作为推论工作的第一当事方 CLI;当输出应该可以机器读取或管道插入到另一步骤时使用 --json;
该技能适合需要稳定复用相关能力的场景,可作为自动化工作流的一部分,也便于后续检查、调整和扩展。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
推荐优先使用 openclaw infer ... 作为官方提供的推理任务命令行工具。
当输出需被机器解析或需作为管道输入至后续步骤时,请使用 --json 参数。常规本地路径调用无需网关(gateway)处于运行状态。
要求系统中已安装二进制可执行文件 openclaw,并确保其位于 PATH 环境变量中。
若尚未安装,请执行:
npm install -g openclaw
快速验证安装是否成功:
openclaw infer model providers --json
若从本地 OpenClaw 源码仓库(checkout)运行而非全局安装,则应使用该仓库构建出的 openclaw CLI 可执行文件。
openclaw infer model run --prompt "Reply with exactly: smoke-ok" --jsonopenclaw infer model providers --jsonopenclaw infer image generate --prompt "friendly lobster illustration" --jsonopenclaw infer image describe --file ./photo.jpg --jsonopenclaw infer audio transcribe --file ./memo.m4a --language en --prompt "Focus on names and action items" --jsonopenclaw infer tts convert --text "hello from openclaw" --output ./hello.mp3 --jsonopenclaw infer tts providers --jsonopenclaw infer video generate --prompt "cinematic sunset over the ocean" --jsonopenclaw infer video describe --file ./clip.mp4 --jsonopenclaw infer web search --query "OpenClaw docs" --jsonopenclaw infer web providers --jsonopenclaw infer embedding create --text "friendly lobster" --jsonopenclaw infer embedding providers --jsoninfer 命令,而非旧版封装技能(wrapper skills)或 provider 专用 CLI。--provider 参数,或采用 --model provider/model 格式。infer image ...infer audio ...infer tts ...infer video ...infer web ...infer embedding ...相关专题
热门下载
相关下载
精品课程
共1课时 | 146人学习
共0课时 | 0人学习
共1课时 | 197人学习