SuperAPI AI 工具集

gws-modelarmor-sanitize-prompt

安全与审计

查看项目

更新于 10-16 08:48

技能介绍

用途:该命令属于 googleworkspace/cli 中的 Model Armor 工具集,用于把用户提示词(prompt)交由指定的 Model Armor 模板做安全净化,适合在把用户输入送入模型之前做内容安全检查。

前提:需先阅读 ../gws-shared/SKILL.md 了解鉴权、全局参数与安全规则;若该文件缺失,运行 gws generate-skills 生成。

用法:gws modelarmor +sanitize-prompt --template <NAME>。--template 为必填,填写完整模板资源名:projects/PROJECT/locations/LOCATION/templates/TEMPLATE。

参数:--text 提供待净化文本;--json 提供完整 JSON 请求体,且会覆盖 --text;两者都未提供时从标准输入读取。示例:gws modelarmor +sanitize-prompt --template projects/P/locations/L/templates/T --text 'user input',或 echo 'prompt' | gws modelarmor +sanitize-prompt --template ...。

适用与限制:用于出站方向的安全净化时,官方提示改用 +sanitize-response。相关命令集为 gws-modelarmor,用于对所有用户生成内容做安全过滤。其余细节暂未提供。