gws-modelarmor-create-template

Creates a Google Cloud Model Armor template via the gws CLI.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill gws-modelarmor-create-template-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-modelarmor-create-template
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/gws-modelarmor-create-template
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill gws-modelarmor-create-template-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up Google Cloud Model Armor templates requires constructing API calls with the correct project, location, and filter configuration, which is error-prone when done manually. ## Core Features & Use Cases - Template Creation: Create a new Model Armor template in a specified GCP project and location with a chosen template ID. - Preset and JSON Configuration: Apply the built-in jailbreak preset or supply a custom JSON body defining the template's filter configuration. - Use Case: A security engineer needs to enforce prompt-injection filtering on an LLM application, so they create a jailbreak-preset Model Armor template in us-central1 and then reference it with sanitize-prompt and sanitize-response commands. ## Quick Start Ask the assistant to create a Model Armor template named my-tmpl in your GCP project at us-central1 using the jailbreak preset, confirming before the write command runs.

Frequently Asked Questions about gws-modelarmor-create-template

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Model Armor template on Google Cloud?

Run gws modelarmor +create-template with the --project, --location, and --template-id flags. Add --preset jailbreak for a ready-made configuration or --json with a custom body to define your own filters.

What is the jailbreak preset in Model Armor?

The jailbreak preset is a built-in template configuration that filters prompts for jailbreak and prompt-injection attempts. It is applied by default when neither --preset nor --json is provided to the create-template command.

Can I use a custom JSON configuration instead of a preset?

Yes, pass --json with a JSON body describing the template configuration. The --json flag overrides --preset, so you can define exactly which filters and thresholds the template enforces.

How do I use a Model Armor template after creating it?

Reference the resulting template name with the gws modelarmor +sanitize-prompt and +sanitize-response commands. These commands apply the template's filters to user prompts and model responses.

Is creating a Model Armor template a destructive operation?

It is a write operation that creates a new resource in your GCP project, so the skill instructs confirming with the user before executing. It does not delete existing resources, but it does require proper GCP authentication and permissions.