技能 编程开发 创建模型防护模板

创建模型防护模板

v20260401
gws-modelarmor-create-template
通过 `gws modelarmor +create-template` 命令在指定项目、地区和模板 ID 上创建新的 Model Armor 模板,可通过预设或 JSON 覆盖配置,方便在清洗前设置安全过滤器。
获取技能
398 次下载
概览

modelarmor +create-template

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Create a new Model Armor template

Usage

gws modelarmor +create-template --project <PROJECT> --location <LOCATION> --template-id <ID>

Flags

FlagRequiredDefaultDescription
--project✓—GCP project ID
--location✓—GCP location (e.g. us-central1)
--template-id✓—Template ID to create
--preset——Use a preset template: jailbreak
--json——JSON body for the template configuration (overrides --preset)

Examples

gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --preset jailbreak
gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --json '{...}'

Tips

  • Defaults to the jailbreak preset if neither --preset nor --json is given.
  • Use the resulting template name with +sanitize-prompt and +sanitize-response.
[!CAUTION]
This is a write command — confirm with the user before executing.

See Also

信息
分类 编程开发
名称 gws-modelarmor-create-template
版本 v20260401
大小 1.65KB
更新时间 2026-04-08
语言