pratikshahp commited on
Commit
c587117
·
verified ·
1 Parent(s): 00f554d

Update guardrail.py

Browse files
Files changed (1) hide show
  1. guardrail.py +6 -2
guardrail.py CHANGED
@@ -1,8 +1,12 @@
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 safety content policy
8
  safe_content_policy = {
 
1
  from together import Together
2
+ from dotenv import load_dotenv
3
+ import os
4
 
5
+ # Load environment variables
6
+ load_dotenv()
7
+ api_key = os.getenv("API_KEY")
8
  # Initialize Together client
9
+ client = Together(api_key=api_key)
10
 
11
  # Set the safety content policy
12
  safe_content_policy = {