pratikshahp
commited on
Update guardrail.py
Browse files- guardrail.py +9 -2
guardrail.py
CHANGED
@@ -1,8 +1,15 @@
|
|
1 |
from together import Together
|
2 |
-
from helper import get_together_api_key
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Initialize Together client
|
5 |
-
client = Together(api_key=get_together_api_key())
|
|
|
6 |
|
7 |
# Set the content policy for guardrails
|
8 |
safe_content_policy = {
|
|
|
1 |
from together import Together
|
2 |
+
# from helper import get_together_api_key
|
3 |
+
from dotenv import load_dotenv
|
4 |
+
import os
|
5 |
+
|
6 |
+
# Load environment variables
|
7 |
+
load_dotenv()
|
8 |
+
api_key = os.getenv("TOGETHER_API_KEY")
|
9 |
|
10 |
# Initialize Together client
|
11 |
+
#client = Together(api_key=get_together_api_key())
|
12 |
+
client = Together(api_key=api_key)
|
13 |
|
14 |
# Set the content policy for guardrails
|
15 |
safe_content_policy = {
|