gws-modelarmor-create-template

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

modelarmor +create-template

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
前提条件: 阅读
../gws-shared/SKILL.md
了解认证、全局标志和安全规则。如果该文件缺失,请运行
gws generate-skills
来创建它。
创建新的Model Armor模板

Usage

使用方法

bash
gws modelarmor +create-template --project <PROJECT> --location <LOCATION> --template-id <ID>
bash
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)
标志是否必填默认值描述
--project
GCP项目ID
--location
GCP区域(例如 us-central1)
--template-id
要创建的模板ID
--preset
使用预设模板:jailbreak
--json
模板配置的JSON主体(会覆盖--preset)

Examples

示例

bash
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 '{...}'
bash
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.
  • 如果未指定--preset或--json,默认使用jailbreak预设。
  • 将生成的模板名称用于+sanitize-prompt和+sanitize-response命令。
[!CAUTION] 这是一个写入命令——执行前请与用户确认。

See Also

另请参阅

  • gws-shared — Global flags and auth
  • gws-modelarmor — All filter user-generated content for safety commands
  • gws-shared — 全局标志和认证
  • gws-modelarmor — 所有用于安全过滤用户生成内容的命令