openai-guardrail
.Create a Guardrails Group
Give your group a name
Select the OpenAI Moderation Integration
tfy-openai-moderation
.
Fill in the OpenAI Moderation Form
harassment
, sexual
, or hate
, enable the Category Thresholds option. You can then adjust the threshold values for each category according to your requirements.Update Category Thresholds
tfy-openai-moderation
in the previous steps, select this guardrail under Input Guardrails.
Select Guardrails
tfy-openai-moderation
guardrail for both input and output.
Select the Guardrail to Apply
curl
.x-tfy-guardrails
header with your selected guardrails.
Code Snippet Section
curl
command (or code for your preferred SDK) and run it.Copy the code snippet
x-tfy-guardrails
header to your request. This allows you to dynamically apply guardrails per request without changing your global configuration.Configure application of guardrails at gateway layer