File size: 744 Bytes
2fc7e06
 
4d69b87
2fc7e06
4d69b87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2fc7e06
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

echo "Setting up environment..."

# Configure guardrails with token
python -c "
import os
import guardrails as gd
try:
    gd.configure(api_endpoint='https://api.guardrailsai.com', api_key=os.environ.get('GUARDRAILS_API_KEY', ''))
    print('Guardrails configured successfully')
except Exception as e:
    print(f'Warning: Could not configure guardrails: {e}')
"

# Try installing validators but don't fail if they don't work
echo "Installing Guardrails validators..."
guardrails hub install hub://guardrails/detect_jailbreak || echo "Warning: Could not install detect_jailbreak validator"
guardrails hub install hub://guardrails/toxic_language || echo "Warning: Could not install toxic_language validator"

echo "Setup completed!"