Update Agents/rankerAgent.py
Browse files- Agents/rankerAgent.py +3 -5
Agents/rankerAgent.py
CHANGED
@@ -81,12 +81,10 @@ Just Output the best_answer from above JSON and nothing else.
|
|
81 |
|
82 |
def rankerAgent(prompt, config_file='config.json', model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"):
|
83 |
# Load API key from configuration file
|
84 |
-
|
85 |
-
# config = json.load(file)
|
86 |
-
|
87 |
-
together_ai_key = config.get("TOGETHER_AI")
|
88 |
if not together_ai_key:
|
89 |
-
raise ValueError("TOGETHER_AI
|
|
|
90 |
|
91 |
# Initialize Together client
|
92 |
client = Together(api_key=together_ai_key)
|
|
|
81 |
|
82 |
def rankerAgent(prompt, config_file='config.json', model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"):
|
83 |
# Load API key from configuration file
|
84 |
+
together_ai_key = os.getenv("TOGETHER_AI")
|
|
|
|
|
|
|
85 |
if not together_ai_key:
|
86 |
+
raise ValueError("TOGETHER_AI environment variable not found. Please set it before running the script.")
|
87 |
+
|
88 |
|
89 |
# Initialize Together client
|
90 |
client = Together(api_key=together_ai_key)
|