SuperAPI AI 工具集

gws-modelarmor-sanitize-response

安全与审计

查看项目

更新于 10-16 05:49

技能介绍

用途:调用 Google Model Armor,通过模板对模型响应做净化处理,属于出站安全(模型→用户)方向的内容过滤。入站方向(用户→模型)应改用 +sanitize-prompt。

用法:gws modelarmor +sanitize-response --template <NAME>。--template 为必填,需填完整模板资源名 projects/PROJECT/locations/LOCATION/templates/TEMPLATE。可选用 --text 传入待净化文本,或用 --json 传入完整 JSON 请求体(会覆盖 --text)。

示例:gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output';也可通过管道传入,如 model_cmd | gws modelarmor +sanitize-response --template ...。

前置条件:需先阅读 ../gws-shared/SKILL.md 了解认证、全局标志与安全规则;若文件缺失,运行 gws generate-skills 生成。

限制:命令要求指定模板资源名;其余参数与返回结果的具体字段资料暂未提供。