validate
and is used to strictly enforce compliance and prevent unsafe or non-compliant data from being processed or returned at any stage.mutate
in the Truefoundry platform.Flow chart of how guardrails work in the AI Gateway
X-TFY-GUARDRAILS
header. You can copy the code from the Playground Section.
To configure at the gateway layer, you will need to create a YAML file that which guardrails need to be applied to which subset of the requests. You can decide the subset of requests based on the user making the request, model or any other metadata in the request. You can read about it more in the Configure Guardrails section.