Skip to content

Commit d90d8d8

Browse files
committed
🚚 moved shell scripts inside guardrails_ai_wrapper/ subdirectory
1 parent 1e75082 commit d90d8d8

File tree

4 files changed

+39
-22
lines changed

4 files changed

+39
-22
lines changed

configure_guardrails.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Load environment variables from .env file
4+
set -o allexport
5+
source /app/.env
6+
set +o allexport
7+
8+
# Check if required environment variables are set
9+
if [ -z "$GUARDRAILS_METRICS" ] || [ -z "$GUARDRAILS_REMOTE_INFERENCING" ] || [ -z "$GUARDRAILS_API_KEY" ]; then
10+
echo "Required environment variables are missing."
11+
exit 1
12+
fi
13+
14+
# Run guardrails configure with the environment variables
15+
guardrails configure <<EOF
16+
$GUARDRAILS_METRICS
17+
$GUARDRAILS_REMOTE_INFERENCING
18+
$GUARDRAILS_API_KEY
19+
EOF
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Install packages from Guardrails Hub
4+
guardrails hub install hub://guardrails/regex_match
5+
if [ $? -ne 0 ]; then
6+
echo "Failed to install regex_match"
7+
exit 1
8+
fi
9+
10+
guardrails hub install hub://guardrails/competitor_check
11+
if [ $? -ne 0 ]; then
12+
echo "Failed to install competitor_check"
13+
exit 1
14+
fi
15+
16+
guardrails hub install hub://guardrails/toxic_language
17+
if [ $? -ne 0 ]; then
18+
echo "Failed to install toxic_language"
19+
exit 1
20+
fi

install_guardrails.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)