Skip to content

Commit 840b543

Browse files
committed
🚧 added two shell scripts to: 1) authenticate guardrails package; 2) install desired guardrails in a virtual env
1 parent 99cae02 commit 840b543

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

configure_guardrails.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Load environment variables from .env file
4+
export $(grep -v '^#' .env | xargs)
5+
6+
# Set additional environment variables for guardrails configuration
7+
export GUARDRAILS_METRICS=$GUARDRAILS_METRICS
8+
export GUARDRAILS_REMOTE_INFERENCING=$GUARDRAILS_REMOTE_INFERENCING
9+
export GUARDRAILS_API_KEY=$GUARDRAILS_API_KEY
10+
11+
# Run guardrails configure with the environment variables
12+
guardrails configure <<EOF
13+
$GUARDRAILS_METRICS
14+
$GUARDRAILS_REMOTE_INFERENCING
15+
$GUARDRAILS_API_KEY
16+
EOF

install_guardrails.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# Install packages from Guardrails Hub
4+
guardrails hub install hub://guardrails/regex_match
5+
guardrails hub install hub://guardrails/competitor_check
6+
guardrails hub install hub://guardrails/toxic_language

0 commit comments

Comments
 (0)