raghuv-aditya commited on
Commit
406e930
·
verified ·
1 Parent(s): a37df12

Update Agents/rankerAgent.py

Browse files
Files changed (1) hide show
  1. 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
- # with open(config_file, 'r') as file:
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 key not found in the config file.")
 
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)