- You want the same Guardrail checks but want to take different basic actions on them
- Your Guardrail checks definitions are dependent on an upstream task and are updated in code
- You want greater control over how you want to handle Guardrails
Example of a Raw Guardrail
type: Specifies the type of hook, which isguardrail.name: Gives a name to the guardrail for identification.checks: Lists the checks that make up the guardrail. Each check includes anidandparametersfor the specific conditions to validate.
Configuring Guardrail Actions
deny: Is set toTRUEorFALSEasync: Is set toTRUEorFALSEsequential: Is set toTRUEorFALSE- whenTRUE, guardrail checks run one after another instead of in parallelon_success: Used to pass customfeedbackon_failure: Used to pass customfeedback
Forwarding Client Headers
You can forward specific client request headers to a guardrail provider by addingforwardHeaders inside the check’s parameters:
forwardHeaders: Optionalstring[]of client headers to forward to this check’s provider. If omitted, no client headers are forwarded. See Forwarding Headers for restricted headers and configuration details.
Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us

