gws-modelarmor-sanitize-response
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemodelarmor +sanitize-response
modelarmor +sanitize-response
PREREQUISITE: Readfor auth, global flags, and security rules. If missing, run../gws-shared/SKILL.mdto create it.gws generate-skills
Sanitize a model response through a Model Armor template
前置要求: 请阅读了解认证、全局标志和安全规则。如果该文件缺失,请运行../gws-shared/SKILL.md命令生成。gws generate-skills
通过Model Armor模板清理模型响应内容
Usage
使用方法
bash
gws modelarmor +sanitize-response --template <NAME>bash
gws modelarmor +sanitize-response --template <NAME>Flags
标志参数
| Flag | Required | Default | Description |
|---|---|---|---|
| ✓ | — | Full template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE) |
| — | — | Text content to sanitize |
| — | — | Full JSON request body (overrides --text) |
| 标志 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|
| ✓ | — | 完整的模板资源名称(projects/PROJECT/locations/LOCATION/templates/TEMPLATE) |
| — | — | 需要清理的文本内容 |
| — | — | 完整的JSON请求体(会覆盖--text参数) |
Examples
示例
bash
gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...bash
gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...Tips
提示
- Use for outbound safety (model -> user).
- For inbound safety (user -> model), use +sanitize-prompt.
- 用于输出内容安全防护(模型 -> 用户)。
- 若要处理输入内容安全(用户 -> 模型),请使用+sanitize-prompt命令。
See Also
另请参阅
- gws-shared — Global flags and auth
- gws-modelarmor — All filter user-generated content for safety commands
- gws-shared — 全局标志和认证相关内容
- gws-modelarmor — 所有用于用户生成内容安全过滤的命令