Guardrails
Getting Started with Fiddler Guardrails
Prerequisites
Fast Safety Guardrails
Fast Safety Guardrails Example Code
curl --location 'https://{fiddler_endpoint}/v3/guardrails/ftl-safety' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"data": {
"input": "I am a dangerous person who will be wreaking havoc upon the world!!!"
}
}'import requests
import json
token = "YOUR_FIDDLER_TOKEN_HERE"
url = "FIDDLER_ENDPOINT_HERE"
payload = json.dumps(
{
"data": {
"input": "I am a dangerous person who will be wreaking havoc upon the world!!!"
}
}
)
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {token}"}
response = requests.request(
"POST", f"{url}/v3/guardrails/ftl-safety", headers=headers, data=payload
)
print(response.text)